Prahlad Inala
Prahlad Inala


Prahlad Inala

Linux File System

Linux File System

Prahlad Inala's photo
Prahlad Inala
ยทMar 26, 2022ยท

3 min read

Play this article

Table of contents

  • Linux File System

Linux File System

In Linux, the File system is in a hierarchical tree structure. It contains one root folder ( / ). In Linux, data is stored in formats like EXT3, EXT4, BTRFS, XFS, and so on



/root/ is the root user's home directory



/home/ contains the home directory of all non-root users



the home directory of a particular user. By default, it contains folders like Desktop, Documents, Downloads, Music, Pictures, Template, Videos.

home prahlad.png

  • each user has its own space.
  • each user can have its own configuration.
  • multiple users can work on its computer
  • programs installed system-wide are available for all users on the computer


/bin/ contains binaries.


  • Executable for most essential user commands like cat, cp, echo,.., etc.,
  • there are all available system-wide
  • What are binaries? Computer-readable format


/sbin/ contains system binaries.


  • these binaries are different from /bin/ binaries
  • these commands are system-related
  • these commands need superuser privilege like adduser, etc
  • What are system binaries? essential system binaries. programs that admin would use (need superuser privilege )


/lib/ contains libraries.


  • essential shared library that executable from /bin/ or /sbin/


/usr/ was used for user home directories.


  • It contains folders like bin (same as /bin/ content), games, include, lib, lib32, lib64, lib, local, sbin (same as /sbin/ content), share, src
  • because of storage limitations it was split to the root binary folder and usr binary folder
  • split doesn't make sense now, as the concept stays the same


  • programs installed here, will be available for all users on the computer
  • program which splits its components are installed here

usr local.png

For example we installed java

  • binary files goes to /usr/local/bin
  • library files goes to /usr/local/lib
  • documentation
  • configuration


programs installed here are available for specific users only



  • optional - third party programs that we install
  • empty for a new install
  • available to all users
  • mostly code editors and web browsers installed in /opt/ directory
  • program which wont splits its components are installed here



  • booting - contains files required for booting



  • etcetera - contains configuration files for system-wide applications
  • It contains system configurations, network configurations, user data, and passwords



  • devices - contains device files for devices like webcam, keyboard, hard disk etc
  • Applications and Drivers will access this directory NOT the user



  • variable - contains files to which the system writes data during the course of its operation


  • /var/log/ - contains log file
  • /var/cache / - contains cache data from application programs


  • temporary - temporary resources required for some process, kept here temporarily



  • removable media - contains subdirectories where removable media devices inserted into the computer are mounted



  • temporary mount points - historically sysadmins used to mount temporary files system here
  • to manually mount a device to the system then we use /mnt/ folder


Did you find this article valuable?

Support Prahlad Inala by becoming a sponsor. Any amount is appreciated!

See recent sponsors |ย Learn more about Hashnode Sponsors
Share this