Understanding the Linux File System Hierarchy
Instructions
Q&A (0)
Notes (0)
Resources (0)
Saving Progress...
Resources
There are no resources for this lesson.
Notes can be saved and accessed anywhere in the course. They also double as bookmarks so you can quickly review important lesson material.
In this lesson, you will gain a fundamental understanding of the Linux/Unix file system hierarchy. You will learn how the file system is organized, the key directories that make up this hierarchy, and their significance.
The Linux/Unix File System Hierarchy
Linux and Unix operating systems organize their file systems in a hierarchical structure. This structure starts at the root directory /
, which is the highest level of the file system, and extends downward, forming a tree-like structure. Understanding this hierarchy is essential for navigating and managing your system effectively.
File Paths
File paths specify the location of files and directories within the file system hierarchy. They begin with the root directory /
and follow the directory structure. For example, the path to a directory might be /path/to/directory
.
Key Directories in the File System Hierarchy
Here are important directories and their descriptions in the Linux/Unix file system hierarchy:
/
(Root Directory): The top-level directory that contains all other directories and files on your system./bin
(Binary Binaries): Contains essential system binary executables required for system maintenance and recovery./sbin
(System Binaries): Houses binaries for system administration and maintenance, often reserved for the superuser (root)./etc
(System Configuration): Contains system-wide configuration files and directories./var
(Variable Data): Holds variable data files, such as logs and temporary files, that may change during the course of normal system operation./tmp
(Temporary Directory): A location for temporary files used by applications and users. Files in this directory are typically deleted upon system reboot./mnt
(Mount Point): This directory is used for temporarily mounting external storage devices like USB drives and network shares./media
(Removable Media Mount Point): Similar to/mnt
, it is often used for mounting removable media like DVDs, CDs, and USB drives./dev
(Device Files): Contains special device files used to interact with hardware devices, such as hard drives, USB devices, and terminals./lib
(Library Files): Houses essential system libraries required for running programs and shared by various applications./home
(User Home Directories): This directory contains the home directories of regular users. Each user has their own subdirectory within/home
, where their personal files and settings are stored./boot
(Boot Loader Files): Contains boot loader files and kernel images used during system startup./usr
(User Programs): Holds user-related programs, libraries, and documentation. This directory is further divided into subdirectories like/usr/bin
,/usr/lib
, and/usr/share
./opt
(Optional Software): Typically used for installing optional or third-party software packages./proc
(Process Information): A virtual directory that provides information about system processes and configuration./root
(Root User's Home): The home directory for the superuser (root)./run
(Run-Time Data): Stores temporary system files and data used during the system's runtime./snap
(Snap Packages): Contains Snap packages, a type of universal Linux package format./sys
(System Information): A virtual directory that exposes kernel and device information./srv
(Service Data): Used for data and files related to services provided by the system.
That is...a LOT of directories, and you won't interact with all of them regularly. Out of all of those directories, you will most likely interact with the following directories regularly:
/home
(User Home Directories)/tmp
(Temporary Directory)/mnt
(Mount Point) and/media
(Removable Media Mount Point)/opt
(Optional Software)/usr
(User Programs)/root
(Root User's Home)
Of course, the directories that you are interacting with will depend on the project and will vary from user to user, but in our experience, these are the ones we worked with the most.