Linux File System Hierarchy Structure

Linux File System Hierarchy Structure

Linux File System Hierarchy Structure

Linux File System Hierarchy Structure

Before we dive directly into the Linux File System Hierarchy Structure let us brush up the concept of Linux Operating System. Just like Windows and Mac OS X, Linux is an operating system. An operating system is software that manages all of the hardware resources associated with your desktop or laptop. To put it simply – the operating system manages the communication between your software and your hardware. But operating a Linux based OS can be difficult in the beginning for anyone who is only used to operating windows based OS. So let’s begin our journey for exploring the Linux OS which starts with learning about the directory structure of Linux OS and in order to make it easy let’s compare LINUX directory structure with that of WINDOWS something that you might already be familiar with.

Below is the figure that shows the Linux File System Hierarchy Structure

Linux File System Hierarchy Structure

From the above figure let’s start digging into each of the directory one by one:

usr –  It is like the program files directory in the Windows OS. It has the following features and uses:

  • Find and install user applications.
  • Other directories that exist inside it are:
  1. bin – Has binary files for commons that are used by any user on Linux system.
  2. sbin – Also has the binary files for commons with the expectation that these files can only be executed by only those users who has admin privileges to maintain and configure the system.
  3. local – this is the path to install applications it’s like the program files directory in windows.

etc – Has the configuration files of the system as well as of the application that are installed using “XAMPP” command, like Apache, MYSQL, etc and all their configuration files are found under this directory.


var – Has all the files whose size is expected to change continuously. Eg. Log files, Database files etc.


var -> temp –  It also stores the temporary files with a difference that from here files get deleted automatically within 30 days.


run – It contains information about system running since last boot. It has a process id of each running service. Its contents are recreated / created each time the system reboots.


home or user home – It can be considered as the equivalent of username folder in windows. Each user has its own home directories that have their own files and further sub-directories.


root – It is the home directory of the root user which is the most powerful user who has all the privileges.


tmp – It contains the temporary files used by system or user. These files get automatically deleted within 10 days period.


dev- It consists all the device files that are used by the system to access the hardware resources such as hard disks etc. It is like the driver folder in windows.


boot – It has bootloader files which are required to load the OS from hard disk to RAM during booting process.


Share this Post:

Related Posts: