Understanding Linux Filesystem: What Every User Should Know About /bin, /etc, /usr, and More
This article provides a comprehensive overview of the Linux directory hierarchy, explaining the purpose and typical contents of each top‑level folder such as /bin, /sbin, /etc, /home, /usr, /var, /proc, and others, helping readers grasp how the system organizes binaries, libraries, configuration files, device nodes, and temporary data.
Top‑Level Directories and Their Roles
/bin : Essential binary executables needed for system boot and basic user commands.
/sbin : System binaries primarily used by the administrator; many are also essential for boot.
/etc : Configuration files for the system and installed services (e.g., /etc/passwd, /etc/rc.d, /etc/fstab).
/home : Home directories for regular users (e.g., /home/user).
/root : Home directory of the superuser.
/lib : Shared libraries required by binaries in /bin and /sbin.
/lib/modules : Kernel modules that can be loaded dynamically.
/dev : Device special files that provide access to hardware devices.
/tmp : Temporary files created by programs during execution.
/boot : Files used by the boot loader, including the kernel image.
/mnt : Mount points for temporarily attaching other filesystems.
/proc : Virtual filesystem exposing kernel and process information.
/usr : Large hierarchy containing most user‑land applications, libraries, documentation, and source code.
/var : Variable data such as logs, spool directories, and temporary files that change frequently.
Important Subdirectories of /etc
/etc/rc or /etc/rc.d – Startup scripts and run‑level configuration.
/etc/passwd – User account database.
/etc/fdprm – Floppy disk parameter table.
/etc/fstab – Filesystem mount table for automatic mounting.
/etc/group – Group information.
/etc/inittab – Init process configuration.
/etc/issue – Pre‑login message.
/etc/magic – File command configuration.
/etc/motd – Message of the day displayed after login.
/etc/mtab – Currently mounted filesystems (maintained by mount).
/etc/shadow – Secure password storage.
/etc/login.defs – Login command defaults.
/etc/printcap – Printer capabilities.
/etc/profile, /etc/csh.login, /etc/csh.cshrc – Global shell initialization files.
/etc/securetty – List of terminals allowed for root login.
/etc/shells – Available login shells.
/etc/termcap – Terminal capability database.
/dev Device Files Overview
/dev/console – System console.
/dev/hd* – IDE hard‑disk devices.
/dev/sd* – SCSI disk devices.
/dev/fd* – Floppy drives.
/dev/st* – SCSI tape devices.
/dev/tty* – Virtual consoles.
/dev/pty* – Pseudo‑terminals for remote logins.
/dev/ttys – Serial ports (e.g., COM1).
/dev/cua* – Serial devices for modems.
/dev/null – Null device that discards all written data.
/usr Hierarchy Highlights
/usr/x11r6 – X Window system binaries and support files.
/usr/bin – Most user commands.
/usr/sbin – System administration commands not needed for basic boot.
/usr/man, /usr/info, /usr/doc – Manual pages, GNU info documents, and other documentation.
/usr/include – C header files.
/usr/lib – Shared libraries and package configuration files.
/usr/local – Locally installed software, mirroring the /usr structure.
/var Directory Details
/var/catman – Pre‑formatted manual pages.
/var/lib – Variable state information for applications.
/var/local – Variable data for locally installed software.
/var/lock – Lock files used by programs.
/var/log – Log files for system and application events.
/var/run – Runtime information such as PID files.
/var/spool – Spool directories for mail, news, printers, etc.
/var/tmp – Larger temporary files that persist across reboots.
/proc Virtual Filesystem
The /proc directory provides a view into kernel and process information. Important entries include:
/proc/cpuinfo – CPU details.
/proc/meminfo – Memory usage.
/proc/uptime – System uptime.
/proc/version – Kernel version.
/proc/[pid]/ – Information about each running process.
Understanding this directory layout helps administrators manage Linux systems efficiently, keep the root filesystem minimal, and organize user data, applications, and system resources appropriately.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
