Skip to main content

1.9 File system layout

In principle, directories in the hierarchy in linux could be structured in any way you like. But, usually, the directory structure of the top couple of levels in the tree follows a pretty rigid pattern. Here's a sample of what to look out for:

/bin Contains programs (binaries) available to all users that are part of the standard linux distribution (such as ls )
/dev Contains the special files for all attached devices
/etc Contains files that are needed for systems administration
/tmp Contains temporary files that can be created directly by the user, or are created by programs being executed by the user. Typically the contents of /tmp are lost if the system shuts down.
/home Contains directories and subdirectories belonging to individual users
/usr/bin Contains useful programs (binaries) for users, but are not essential for the system's operation. Files like this can also be found in /usr/local/bin
/lib Contains libraries of compiled C subprograms that can be called by C programs and linked with them
/usr/lib Contains many libraries for user-related programs
/usr/include Contains header files for C programs
/opt Typically contains extra and third party software