Linux File System
Categories:
2 minute read
Common level 1 directories found in the Linux filesystem:
/
: otherwise known as root, the home directory for the root user, the administrative superuser in Linux.
/bin
: essential binaries (executable programs) needed for basic system functioning and user commands.
/boot
: files related to the boot process, such as the Linux kernel, initial RAM disk (initrd), and boot loader configuration.
/dev
: device files that represent and allow access to various devices attached to the system, such as hard drives, terminals, printers, and more.
/etc
: system-wide configuration files that define the behavior and settings of various programs and services on the system.
/home
: user home directories, where individual users can store their personal files and configurations.
/lib
: essential shared libraries (code files) needed by programs during runtime.
/media
: Typically used as a mount point for removable media devices such as USB drives, CDs, or DVDs.
/mnt
: Often used as a temporary mount point for mounting filesystems or devices.
/opt
: Used for installing optional or third-party software packages. It typically contains self-contained software applications or libraries.
/proc
: A virtual filesystem that provides information about running processes and system status. It exposes various system and process-related details as files and directories.
/run
: runtime data that needs to be available during system startup and across reboots.
/sbin
: essential system binaries used for system administration tasks. These binaries generally require administrative privileges to execute.
/srv
: Intended for storing data files specific to particular services provided by the system.
/sys
: Another virtual filesystem that provides information about the system’s hardware devices, drivers, and kernel settings.
/tmp
: A temporary directory where programs and users can store temporary files. The contents of this directory are typically cleared on system reboot.
/usr
: user-related files and directories. It includes various subdirectories such as /usr/bin, /usr/lib, /usr/share
/var
: variable data files, such as logs, spool files, temporary files, and other data that changes during system operation.