Linux File System Layout

Linux File System Layout
By Tad Brooker

Today I would like to provide a high level overview of the Linux file system layout and structure. This is not intended to be a deep-dive or detailed description but more so to provide a general understanding of what you are presented with after installing Linux.

To take a quick look at the file system structure on your Linux machine, type the following:

$ cd /
$ ls

You will see something very similar to what is listed below, depending on your distribution there may be some slight variations.

File system directories:

/bin                 Executable programs used by the system and users (link to usr/bin)
/boot               Kernel, grub and start up files
/dev                All devices which are designated by files with special properties
/etc                 System configuration files
/home             User home directories, individual user files, directories, data and configuration
/lib                  Library files needed by the system (link to usr/lib)
/lib64              64 Bit Library files needed by the system (link to usr/lib)
/lost+found     Files that were saved during a system or program failure
/mnt                Mount point for external file systems and drives
/opt                 Third party and extra software
/proc               Contains information about system resources
/root                The administrator’s home directory
/sbin                System and administrator programs
/tmp                Temporary system space for scratch files, contents are deleted on reboot
/usr                 User libraries, programs and documentation
/var                 Variable file storage, log files, print spool and other temporary files

You may find yourself working in some of the directories off the root file system such as tmp, etc, or boot but be aware you will most likely need elevated privileges for the latter two. Users will spend most of their time in the /home/username/ directory. This is where all of your documents, pictures, music and files are stored.

You will have full control over all contents in your user directory so this is where you will do most of your work. If you need to backup all of your contents an a system, the /home/username/ will contain everything you need and is a simple point to start your backups.

System administrators will spend a lot of time in the /etc/ directory as this is where the majority of the configuration files are stored. Root or sudo privileges will be required to change or modify any system or configuration files.

As a standard user you can browse most of the structure, be careful – read and do not modify unless you know what you are doing – one mistake can render the system unusable!