File System Structure [1]

Linux file system structure

Path

Description

/

Root directory

/boot

System critical directory which contains files required for booting: kernel, boot manager and ramdisk initramrd with drivers

/boot/grub

System critical directory which contains config data for the grub boot manager; optional changes to rub.cfg only by advanced users

/bin

System critical directory which contains main executables, which are required for system operations (like bash, chmod, mount). Also see /sbin and /usr/sbin

/cdrom

Former mount directory for optical drives (same as /floppy)

/dev

System directory for device files: all recognized devices are displayed as files here

/etc

Central directory for all system-wide configuration data, partially directly in its root like sudo-rights, fstab, mime-types (file types),shadow (accounts and passwords), but most in extra directories like /etc/ssh (OpenSSH configuration), /etc/X11 (GUI configurations), /etc/apt (list of all loaded package lists)

/home

Collective directory for all user accounts (except root)

/home/[user]

Home directory of a user which contains typical sub-directories for images or documents. Besides the temporary mount directories /media/[user] and /run/user/[account_id] it is the only directory where the user has all rights, including ownership

/home/[user]/.cache

User specific temporary storage, mostly for fonts, thumbnails or system icons

/home/[user]/.config

Important hidden collective directory for user specific software settings (desktop, language, auto-launch, webbrowser, email, mime-types and others)

/home/[user]/.local

Collective directory for desktop user settings, which are prioritized over common settings, like desktop links (.desktop files) at ~/.local/share/applications

/lost+found

Contains rescued file fragments from a file system analysis via fsck (usually only used by forensic scientist)

/media

Mount directory for removable media like USB or DVD devices. Commonly used by automount when inserting the device. The content is loaded under /media/[user]/[device] with all access rights for the current user

/mnt

Optional directory for temporary and static mount of external devices like USB or DVD (is not used by automount, which uses /mnt)

/lib
/lib64

System critical directories contains essential libraries (32 and 64 Bit). Additional lib-directories (like /usr/lib, /var/lib) are required for applications, but are not system-critical

/opt

Optional collective directory for additionally installed applications, which are not part of the Linux distribution

/proc
/sys

Collective directory for dynamically requested system and hardware data of all kind, especially CPU, RAM, kernel, devices and processes. /proc provides information to many system tools, like CPU and RAM queries (for example cpuinfo, meminfo, modules, mounts, partitions, uptime)

/tmp

Collective directory for temporarily needed files by software executions or installations. It’s the only directory in which all system accounts have unlimited writing access

/root

Home directory for the pseudo-account root; if root is actively used, the same sub-directories for account data and configuration files like in /home/[user] are created

/run

Dynamic information shelf for all applications (tmp-directory during runtime)

/run/[user]/[user-id]/gvfs/

Mount directory for automatically hooked network resources for Gnome-like desktops (Gnome, Budgie, Cinnamon, XFCE)

/usr

Collective directory for non-system related applications (User System Resources), so most application used on the desktop

/usr/bin

Contains most applications featuring a graphical user interface (as opposed to /bin and /sbin)

/usr/lib

Contains libraries required by non-system related applications

/usr/local

Complementary software directory; executable programs under /usr/local/bin are prioritized over /usr/bin

/usr/share/applications

Collective directory for program launcher, which are shown in menus and the desktop

/sbin

System critical directory which contain main executables for system maintenance, which can only be executed with root rights (for example fdisk, fsck, hdparm, mkfs, parted). Also see /bin and /usr/bin

/srv

The default mount point for devices on server systems compliant with FSH (File System Hierarchy), although some servers still use /mount or /media

/var/log

Collective directory for system logs

/var/spool

Directory for pending queue jobs, foremost print orders

/var/www/html

Default directory for Apache and nginx web services