Linux Filesystem Hierarchy Standard (FHS)
The Filesystem Hierarchy Standard (FHS) defines the directory structure and directory contents for Linux distributions. It is maintained by the Linux Foundation. Although each Linux distribution has its own quirks, the majority mostly conform to the FHS.
The top-level hierarchical directory on a linux file system is called the root
(/
). Directories directly under root include:
/bin : Executable files needed to manage and run linux including `bash`, copy and more.
/boot : boot system files.
/dev : (Device) Special files which represent hardware actually connected to the system.
Interactiong with these files is how linux interacts with real devices.
/etc : Configuration files for Linux and services running on the system.
/etc/passwd : contains all user account names and IDs
/etc/shadow : contains encrypted passwords for accounts
/etc/group : Contains all info for user groups
/etc/login-defs : Configs for creating new users
/etc/skel : Contains the default files and directories to copy-in to a new users _home_ directory.
/etc/default :
/etc/default/useradd : Contains default new user configuration options.
/home : User "home" directories.
/lib : code libraries which apps in `bin` and `sbin` use.
/media : support for external devices (usb)
/mnt : mount external devices
/opt : files for programs which can be installed manually.
/proc : special directory with does not exist on the file system.
It is a pseudo file system created dynamically when accessed.
Used to access processes and other system features from the kernel.
Subdirectories are named after actual running process IDs.
/root : `root` users home directory
/sbin : Executable files needed to manage and run linux including `disk, init, shutdown`
/srv : Where services like `httpd` and `ftpd` save their files.
/sys : info about the hardware in the system.
/tmp : Contains temporary files.
/usr : Contains application files. Most applications are stored under here.
/usr/bin : Binary executable files
/usr/lib : Libs for the apps
/usr/lib64 : 64 bit libs
/usr/local : locally created software
/usr/sbin : system administration binary files
/usr/share : documentation and man pages
/var : linux _variables_ data and log files.