- The Filesystem Hierarchy Standard (FHS) defines the directory structure and directory contents in Linux distributions
- Filesystem Hierarchy Standard (FHS) file system structure, which defines the names, locations, and permissions for many file types and directories.
- The latest version is 3.0, released on 3 June 2015
Linux File System Hierarchy
1 ) “/” (slash) :-
a) It is the parent directory of Linux under which all other directories are present.
a) Contains all essential binaries which can use by host(root) as well as all other users.
b) It means it contains essential command binaries that are available in single user mode.
a) Contains all essential binaries which can use by only host (i.e. root).
b) It’s path is not present in PATH environment variable of other users.
4) “/dev” :-
a) It contains all device drivers through which we can operate on using required tools.
5 ) “/etc” : –
a) It contains all configuration files.
6 ) ” /home” :-
a) By defaults Local User Home directory.
7 ) “/root” :
a) root user home directory
8) “/run” :
a) run-time variable data.
b) This directory contains system information data describing the system since it was booted.
c) Files under this directory must be cleared (removed or truncated as appropriate) at the beginning of the boot process.
d) Process identifier (PID) files, which were originally placed in
/etc, must be placed in
e) The naming convention for PID files is
<program-name>.pid. For example, the crond PID file is named
9) “/tmp” :
a) A world-writable space for temporary files.
b) Files which are more than 10 days old are deleted from this directory automatically.
c) Another temporary directory exists, /var /tmp, in more than 30 days are deleted automatically.
10) “/usr ” :
a) Installed software, shared libraries, include files, and static read-only program data. Important subdirectories include:
-/usr /bin: User commands.
-/usr/sbin: System administration commands.
– /usr /local: Locally customized software.
a) Variable data specific to this system that should persist between boots.
b) Files that dynamically change (e.g. databases, cache directories, log files, printer-spooled documents, and website content) may be found under /var .