The Root Folders of Linux

“/”
Root directory that forms the base of the file system. All files and directories are logically contained inside the root directory regardless of their physical locations.

“/bin”
Contains the executable programs that are part of the Linux operating system. Many Linux commands, such as cat, cp, ls, more, and tar, to name a few are locate in /bin. It is the commands you can type regardless of where in the file structure you are. Should you put any shell scripts in here, and they would be executable in every folder.

“/boot”
Contains the Linux kernel and other files needed by LILO and GRUB boot managers.

“/dev”
Contains all device files. Linux treats each device as a special file. All such files represents either a USB drive, DVD drive depending on what you have installed on the box.
This folder is often mistaken for the “/media” and “/mount” folder by new users.

“/etc”
Contains most system configuration files and initialization scripts. Often (but not always) services or applications have a config file here that it would be possible to change to get the service to do what you desire.

“/home”
Welcome home user!
Home directory is the parent to the home directories of all the users except the root user.

“/lib”
Contains library files, including loadable driver modules like audio driver, video driver, and other drivers needed to boot the system.

“/lost+found”
Directory for lost files and folders. Every disk partition has a lost+found directory. If the system finds segments of a file that it cannot link to anything its placed in the lost+found directory. Anything can go into a lost+found directory, file fragments, directories, and even special files. Should you be so “lucky” to find folders here that you recognize, you should locate that folder on the system and see if it’s okay, and cross your fingers that you have backup.

“/media”
Directory for mounting files systems on removable media like Optical drives, floppy disks, etc. (not USB, as these are located in /mnt)

“/mnt”
A directory for temporarily mounted filesystems such as USB or other memory cards.

“/opt”
Optional software packages files are located here. This is a directory for installing unbundled packages like packages not part of the Operating System, but provided by an independent source. Each package will be located in its own sub-directory.

“/proc”
A special directory in a virtual filesystem. It contains the information about various aspects of a Linux system.

“/root”
Home directory of the root user.

“/sbin”
Contains administrative executive files. Commands such as mount, shutdown, umount, reside here.
Explained simple; files that needs “sudo” to be executed are located here. For example; running “shutdown now” would not work because its located in the /sbin directory and requires higher authorization to be started. Running “sudo shutdown now”, the system asks the user to authenticate before it executes the command.

“/srv”
Contains data for services (such as HTTP, FTP, etc.) offered by the system.

“/sys”
A special directory that contains information about the devices, as it is seen by the Linux kernel.
One can say it is an interface to the kernel. It provides a filesystem-like view of information and configuration settings that the kernel provides, similar to what the /proc folder does. It is an old folder that first emerged on the Linux Kernel v2.6, but is still represented in most distros released even today.
Click here if you want more information on the SYS folder.

“/tmp”
Temporary directory which can be used as a scratch directory (storage for temporary files). The contents of this directory are cleared each time the system reboots.

“/usr”
Contains sub directories for many programs such as ftp, and telnet installed by the user. It is best narrowed down to “all user related software“.
Even though many people read it as user, it is actually short for “User System Resources”.

/var
Contains data like system log files, mail and printer spool directories, and several temporary files.
Different from the /tmp folder, data in the /var directory does not get wiped during reboot.

– – – – – – – – – – – – – – – – – – – – – – – – –

To get a better overview of the Linux file system tree, you can click on the image below.
Hope this was of any help to you!

Linux File System Tree