Linux organizes system data and programs using a hierarchical tree-like file system. All directories originate from the root / and branch into specialized folders. Learning the purpose of each directory helps users manage configurations, locate files, and understand how Linux operates beneath the surface.
/ – Root DirectoryThe starting point of the entire Linux file system hierarchy. Every other directory branches from here.
/bin – Essential ProgramsContains critical executable files needed during boot and for basic system functionality (e.g., ls, cat).
/boot – Kernel and BootloaderStores boot-related files including the Linux kernel (vmlinuz) and bootloader configurations (e.g., GRUB).
/dev – Device FilesLinux treats hardware as files. This directory contains device nodes representing disks, input devices, etc.
/etc – System ConfigurationHome to global configuration files and startup scripts. Notable files:
/etc/passwd – User account info/etc/fstab – Disk mount points/etc/crontab – Scheduled tasks/home – User DirectoriesContains personal directories for each non-root user. Files are stored at /home/username.
/lib – Shared LibrariesHolds library files required by binaries in /bin and /sbin. Comparable to DLLs in Windows.
/media – Auto-mounted External DevicesTemporary mount point for devices like USB drives, DVDs, automatically managed by the system.
/mnt – Manual MountingTraditionally used for manually mounting additional storage (e.g., mount /dev/sdb1 /mnt).
/opt – Optional SoftwareUsed for installing third-party or proprietary applications outside the standard Linux package system.
/proc – Kernel InfoA virtual directory that exposes real-time kernel and process data, used by tools like top or ps.
/root – Root User’s HomeDedicated home directory for the root (admin) user. Isolates root from normal users in /home.
/sbin – System BinariesIncludes administrative tools like shutdown, init, fsck. Often restricted to root access.
/tmp – Temporary FilesUsed for temporary file storage. Many systems clear /tmp automatically on reboot.
/usr – User ProgramsTypically the largest directory. Contains applications and resources for regular use:
/usr/bin – Main executables/usr/lib – Shared libraries/usr/share – Icons, docs, locale files/var – Variable DataStores changing files like system logs, mail spools, databases, and cached content.
/var/log – Log FilesInside /var, this directory contains log files for debugging and auditing system activity.
Linux structures its file system for maximum clarity and stability. Each directory has a specific purpose, whether it’s storing user data, system binaries, or dynamic content. Familiarity with these directories equips administrators and users to troubleshoot, configure, and interact with the system more effectively.