[GNU/Linux] Linux directory structure

| | 1 min read

There are various types of individual high level directories in linux such as /etc, /dev, /proc, /bin, /tmp, /var, /sbin etc. Read on to know more about the directory structure.

 /bin  - User Binaries          
 /etc  - Configuration files    
 /dev  - Device files           
 /var  - Variable files         
 /sbin - System Binaries        
 /proc - Process informations   
 /tmp  - System binaries        

/bin

The commands used by all users in the system are located in /bin. This directory contains binary executable files. Commands like ls, grep, cp are all located here.

/etc

This directory contains configuration files required by all programs. It contains all startup and shutdown scripts used to start/stop individual programs. /etc/resolv.conf is an example for this.

/dev

This directory contains all device files. This contains USB or any devices that are connected to the system.

/var

'var' refers to variable files. This directory contains system log files (/var/log). Packages and database in (/var/lib). Emails (/var/mail).

/sbin

This directory also contains binary executable files but mainly the commands located in 'sbin' are used by system administrators. ifconfig, reboot, iptables etc are examples for this.

/proc

This directory contains information about system processes. The processes running with a particular PID is found in /proc/[PID].

/tmp

This directory contains temporary files that are created by the users in the system. All files in this folder will be deleted when the system under goes a reboot process.