Linux FHS(Filesystem Hierarchy Standard)
/
(root directory):
The top-level directory in the file system hierarchy.
Only root user has write privilege under this directory.
/bin
:
Essential command binaries that are required for the system to boot and run.
Commands used by all the users of the system are located here.
For example: ps, ls, ping, grep, cp.
/boot
:
Contains files needed for the boot process, such as the kernel, initramfs, and bootloader configuration.
/dev
:
Device files, representing hardware devices connected to the system.
/etc
:
Configuration files and directories containing system-wide configuration files.
This also contains startup and shutdown shell scripts used to start/stop individual programs.
For example: /etc/resolv.conf, /etc/sysconfig/network-scripts/ifcfg-eth0
/home
:
Home directories for users.
/lib
and /lib64
:
Essential shared libraries and kernel modules.
/media
:
Mount points for removable media (e.g., USB drives, optical discs).
/mnt
:
Mount points for temporarily mounted filesystems.
/opt
:
Optional application software packages.
/proc
:
A virtual filesystem that provides information about processes and system configuration.
/root
:
Home directory for the root user.
/run
:
A tmpfs (temporary file system) mounted at boot to store runtime information.
/sbin
:
System binaries, which are essential for system administration but not for regular users.
/srv
:
Data for services provided by the system.
/sys
:
A virtual filesystem that exposes information about the kernel, devices, and other kernel-related information.
/tmp
:
Temporary files are usually cleared on system reboot.
/usr
:
Secondary hierarchy containing user and system binaries, libraries, documentation, etc.
/var
:
Variable files — files that may change in size or content during the course of normal system operation (e.g., logs, spool files).