Linux File System and Directories – POFTUT

Linux File System and Directories

In this tutorial we will look details about Linux file system and directories. Linux stores binaries, files, images, libraries etc. in the file system for persistence. Ram is cleared between reboots but file system stays same if there is no change made intentionally.

Root File System

Linux file system hierarchy is leveled. So on the top of file system tree root path. All other files and directories are under this root path. For example if a usb is mounted which means connected to the Linux system it will exists generally in /media/<username>/<usb name> like /media/ismail/myusb . 


File is container for data like binary, image, text, dll etc. File have no child.We can list files like below

  • Except output all of them are files
  • output is directory


Directory hold files and child directories and used as holder for these items. Directory have no data.

Directories and Their Meaning

Where is binary files stored? How can I change some configuration of applications?  Where are my logs? We will look general usage of the directories

  • root path and holds all other paths
  • /usr , /bin user related binaries hold in these paths
  • /sbin administrator related paths are hold here
  • /opt third party installed applications lays here
  • /etc configuration files are hold here
  • /var/log log files are saved acording to their application
  • /home user home directories and desktops are created here
  • /root ultimte administrator root’s home directory is here
  • /lib libraries requred to run applications
  • /media mount point for media like usb
  • /mnt mount point for temporary mounted file systems
  • /tmp temporary files
  • /var variable files like log, spool
  • /var/www web server apache2 default directory
LEARN MORE  What Is Hyperlink?

Leave a Reply

Your email address will not be published. Required fields are marked *