Understanding the Linux File System blog lionguest studios

The best explanation for Linux File System Structure in detailed 2020

The Linux file system is nothing but a structure in which all of the files are stored on a hard disk. The main goal of the file system is to keep all the files and folders organized inside the hard drive. The Linux File System follows the Filesystem Hierarchy Standard (FHS) which defines the structure and layout and is maintained by the Linux Foundation.

Linux file system is case sensitive which means that the file “test.txt” and “Test.txt” they both will be treated as two different files by the Linux file system. But in Windows, that’s not the case. The Windows file system (NTFS or FAT) will treat these files as a single file.

There are various directories inside the Linux file system. To open the file system on to your Linux machine you just have to open File Explorer and select “Other Locations” in the left-hand side section.

linux root directory location lionguest studios

Linux File System Structure

The “/” represents a root. Anyone can view this directory but only the root user will have the rights to make any modifications. Inside this, there are various directories (folders) and each of these directories is used to store a specific type of data. For example: /bin is used to store binaries or /media is used to show mounted devices, etc. All the directories which are present inside the root directory (“/”)are listed below.

linux directory structure lionguest studios

/bin

The bin is short for binaries. It contains all the binary files for the applications.

/sbin

It contains all the system binaries that a system administrator will use. A standard user won’t have access to this without permission.

/boot

This is a very important directory that you don’t have to play with because it contains all of the files which an operating system needs to boot.  Your operating system’s bootloader lives here.

/cdrom

This directory was used to show the connected cdrom drive but the Linux operating system doesn’t use this anymore. Instead, we use the “media” directory for showing all the connected devices. Also, this directory is not available in most of the recent Linux distros.

/dev

All the devices of the computer will be listed here. It consists of a mouse, keyboard, etc.

/etc

It is also called as “et cetera” meaning this folder is where all of your configurations which are system-wide like apt, source.list, etc will be stored.

/lib32 and /lib64

These are where all of the libraries are stored.

/mnt and /media

“mnt” stands for the mount. All of the devices which are mounted manually will be displayed here. Media directory contains devices like the USB, cdrom, etc.

/opt

“opt” stands for optionals. It is where all of the proprietary programs like google chrome, team viewer, etc are stored.

 /root

This directory is the root user directory. Don’t get confused with the “/” and “/root” they both are two different things.

“/” represents the root directory of the Linux file system or the entry point from where the Linux file system starts. And “/root” is the root directory for the user who has root privileges. You need to have root permission to access the “/root” directory.

/srv

This directory is used when we have a server running on our system. So, all the files of services data can be accessed here.

/sys

This directory is used to interact with the kernel. The data available here is not physically written to the disk. It is created every time when a system boots up.

/tmp

It contains all the temporary files. All the applications which are running on the system use this directory to store temporary data. We lose all of the data present in this directory when we turn off our computer.

/usr

All the applications which are installed by the user will reside here. It is also known as “Unix System Resource”.

/var

var is a variable directory. It stores information related to the system log files, system crash reports, etc.

/home

The home directory is where all of the users and there files and folders will be displayed. The most popular folders which a user regularly uses like Documents, Desktop, Downloads, Pictures and so on, all of them reside here.

This was the introduction to the Linux file system. If you have any questions regarding this then you can ask them in the comments section below.

Thanks for reading and if you like the content then support us on Patreon. Your support will surely help us in writing more of such content.

For more such blogs related to Linux, you can visit our Linux Operating System category.

Leave a Comment

Your email address will not be published. Required fields are marked *