We are still actively working on the spam issue.

GNU/Linux Directory Structure

From InstallGentoo Wiki
Jump to: navigation, search

GNU/Linux and other UNIX-like operating systems follow a similar directory structure, as defined by the Filesystem Hierarchy Standard, an organization maintained by the Linux foundation. There are also some directories that aren't defined by the standard.


/ or Root directory is the top-most directory in the hierarchy. This is where all the other file systems or mounted when the system boots up. Not to be confused with /root.


/bin stands for binaries. It contains necessary coreutils required to mount other directories. In most distributions, this exists as a symlink to /usr/bin.


The /boot directory contains all the files necessary for booting up the system. Mostly consists of bootloader and kernel files.


/dev abbreviates as devices. Everything is a file in GNU/Linux, even devices. The hardware is represented as a special file. Also contains some pseudo-devices, such as /dev/urandom and /dev/null.


The /etc (et cetera) directory consists of system-wide configuration files and databases.


The /lib directory has some important C libraries required by the /bin directory. There also exists lib32 and/or lib64 depending on the system architecture. It exists as a symlink to /usr/lib in most distributions.


The home directory has a folder for each user. It enables to have user-specific configuration files. By default each user has read and write access to their home directory and must need special elevated permissions to modify files outside their home directory. If your username is gentoo, then your home directory would be /home/gentoo.


The mount point for devices such as USB drives and other media devices.


/opt (Optional) is where locally installed software exists.


Temporary directories are mounted in /mnt. For example, in a dual-booted system, you'd mount the windows partition as /mnt/windows.


This is the place where temporary files are stored. This directory is cleaned during startup.


This is similar to a /home directory but for the root user, aka system administrator.


This is like a /bin directory but for commands used by system administrators. Consists of important commands for starting, maintaining and recovering the system.


The /usr directory contains executable, libraries, and other shared resources.



/usr/local is like the /bin directory but executables which should not be update as it could cause issues


The /var (variable) directory, is where important information like caches, log files, etc are stored. This is similar to /tmp but the files aren't clear during startup.

Example directory structure

bin -> usr/bin
lib -> usr/lib
lib64 -> usr/lib
sbin -> usr/bin
Note: The -> refers to symlinks