Linux - Tree structure of files

File hierarchy under Linux

To ensury compatibility and portability, Linux systems comply with the sole FHS (File Hierarchy Standard) standard. The basic hierarchy is as follows:

/the root, containing the main directories
/bincontains essential executables of the system, used by all the users (such as, for example, the commands ls, rm, cp, chmod, mount, etc.)
/bootcontains the files which allow Linux to start up
/devcontains the entry points for the peripherals
/etccontains the commands and the files that are necessary for the system administrator (files passwd, group, inittab,, lilo.conf, etc.)
/etc/X11contains the specific files for the configuration of X (contains XF86Config, for example)
/etc/optcontains the specific configuration files for the applications installed in /opt
/homepersonal user directory
/libcontains shared libraries that are essential for the system during startup
/mntcontains mount points of temporary partions (CD-Rom, floppy disk, etc.)
/optcontains packages of supplementary applications
/rootdirectory of the root administrator
/sbincontains the essential binary systems (for example the command adduser)
/tmpcontains temporary files
/usrSecondary hierarchy
/usr/X11R6this directory is reserved for the system X version 11 release 6
/usr/X386used before by X version 5, this is a symbolic link with /usr/X11R6
/usr/bincontains the majority of the binary files and user commands
/usr/includecontains the header files for the programs C and C++
/usr/libcontains most shared libraries of the system
/usr/localcontains data pertaining to the programs installed on the local machine by the root
/usr/local/binbinaries of local programs
/usr/local/gamesbinaries of local games
/usr/local/includelocal C et C++ header files
/usr/local/libShared local libraries
/usr/local/sbinLocal system binaries
/usr/local/shareIndependent hierarchy
/usr/local/srcLocal source files
/usr/sbincontains the binary files that are not essential for the system that are reserved for the system administrator
/usr/sharereserved for non-dependent data of the architecture
/usr/srccontains code source files
/varcontains variable data
Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled « Linux - Tree structure of files », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!