Directory Structure in Linux: Once you have migrated from Windows to Linux you may notice that the filesystem is not what you are accustomed to. Of the first things a new Linux user needs to understand is the inner workings of the file system hierarchy in Linux. Knowing this early on will help you to become oriented with and hopefully confident in navigating and using this directory structure.
Linux Filesystem | Directory Structure in Linux
To help you better understand the generic Linux structure, each directory is listed below. Each directory structure of Linux operating system is followed by explanation of what it is most commonly used for.
Linux Directory | Purpose of the Filesystem Structure |
---|---|
/bin | Essential system utilities for diagnosing, repairing, and managing the system. |
/boot | Boot loader programs and configuration files required for system startup. |
/cdrom | Shortcut to the CD/DVD drive for accessing optical media. |
/devbootstrap | Files generated during the installation of Ubuntu, primarily used during bootstrapping. |
/dev | Virtual files representing hardware devices on the system. |
/etc | Central location for system-wide configuration files. |
/home | Personal directories and files for each user. |
/initrd.img | Symbolic link to the ramdisk used during the Linux boot process. |
/lib | Shared system libraries and essential runtime files. |
/lost+found | Directory for salvaged files recovered after an improper system shutdown. |
/media | Mount point for removable storage devices like USB drives and external hard disks. |
/mnt | Temporary mount point for externally mounted filesystems. |
/opt | Directory for optional additional software not critical for system operation. |
/proc | Virtual filesystem containing information about system processes and kernel settings. |
/root | Home directory for the root user, the system administrator. |
/sbin | System administration binaries and essential system binaries. |
/srv | Location for service-specific data and configuration files for network servers. |
/sys | Mount point for Sysfs, a virtual filesystem used by the Linux kernel to interact with hardware. |
/tmp | Temporary directory for storing files needed for a short period. |
/usr | Shared system resources, including executables, libraries, and documentation. |
/var | Constantly changing data such as logs, spool files, and temporary files generated by processes. |
/vmlinuz | Symbolic link to the kernel file used during system boot. |