Linux Data directory and their description

The Linux and Unix data directory is used to store data of the system.

Data directory contains following directories.

1./home
2./root
3./srv
4./media
5./mnt
6./tmp

Data directory /home

The ‘/home’ directory stores users personnel files. After the ‘/home’ there is a directory which is generally named at the user’s name like we have ‘/home/sssit’. In this directory we have our sub-directories like Desktop, Downloads, Documents, pictures, etc.

Like example of /home directory :

# ls /home  
# ls /home/sssit  

Look at the above snapshot, command “ls /home” displays ‘sssit’. While command “ls /home/sssit” displays ‘sssit’ sub-directories.

Note: Tilde (~) sign indicates “/home/sssit”. If you want to give the command “/home/sssit/Desktop” so instead of writing this you can also write “~/Desktop”, both are same.

Data directory /root

The Unix and Linux /root directory is the home directory of the root user.

Please note that ‘/root’ directory is different from ( / ) root.

Like example of /root or / directory :

#ls /root

or

#ls /

Now you can see your terminal picture.

Data directory /srv

‘srv’ is short for service. Unix and Linux ‘/srv’ directory contains server specific data for services provided by the system like www, cvs, rysync, ftp, etc.

Like example of /srv directory :

#ls /root

Data directory /media

Unix or Linux /media directory acts as a mount point for removable media devices such as CD-Rom, floppy, USB devices, etc.

This directory and hence a system can run without this directory also.

Like example of /srv directory :

#ls /srv

Data directory /mnt

‘mnt’ stands for mount. Linux ‘/mnt’ directory should be empty and sysadmins can only mount temporary filesystems.

Like example of /mnt directory :

#ls /mnt

Data directory /tmp

‘tmp’ stands for temporary. The Linux data stored in ‘/tmp’ is temporary and may use either disk space or RAM. Linux or Unix system is rebooted, files under this directory is automatically deleted. This advisable that never use ‘/tmp’ to store important data.

Like example of /tmp directory :

#ls /tmp

Leave a Reply