Linux Directory Structure

Linux File System is organized in directories, each directory serves a purpose, here you can find a short but precise description for the most usefull directories:


The root directory, all directories start from this directory.


Has programs essential for the system.


Has the Linux kernel, files needed for the boot sequence and boot configuration files.


Everything in Linux is a file, a device recognized by the system is represented by a file.


Has system wide configuration files, some of the most important are:* crontab: scheduled tasks
* fstab: mount points
* passwd: users


Has directories for each user, a good practice is to keep this directory on a seperate partition.


Shared libraries for the programs.


It keeps filesystem recovered files, normally is empty.


Mount points for removable media like usb.


For things you mount manually or with fstab.


Usually is used to install optionall software.


Its a virtual file system which keeps files for running processes.


The home directory for the root user.


Programs that used from the root user.


Used to keep temporary files used by the processes, its emptied after a reboot.


Contains programs/files used by regular users.


Contains programs installed by the Linux installer.


Shared libraries for programs in /usr/bin.


Programs that are not installed by the Linux installer, but are used for system wide usage.


Programs executed with sudo or root user, usually system administration things.


Files shared by programs in /usr/bin.


Documentation files of programs in /usr/bin.


Holds files that usually changes over time, like databases files.


Logs of various programs.

Written by

DevOps engineer, loves Linux, Python, cats and Amiga computers

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store