The Linux File System Explained

The Linux file system can be very confusing at first especially if you are coming from a windows background. There is no C Drive or “Program Files” folder. However, I find it actually much simpler and more straightforward. I’ll try to break it down as much as I can for you.

The Linux file system is like a tree where everything starts from the root and branches out. And everything can be traced back to one root.

/

The Forward Slash / a.k.a. the Root Directory is where the system starts. Even your external hard drive and devices exist under the root irectory. it has no parent directory and everything branches from it. Even your external Hard drives and USB Flashes.

/bin

This is where all the executable files of the applications and the software you have on your system lie. You can see you have for example the cat , ls applications.

/boot

This is the directory that handles the boot of your system. Normally you don’t want to mess with that. This is only for advanced users.

/dev

This is where your devices live. Every device is represented by a file or a folder. For example, a hard disk would be /dev/sda, /dev/sdb and so on.

/etc

The name of this folder has always been debated whether it stands for “et cetera” or “edit to configure”. Either-way, this is the folder where your applications store their configuration files.

/home

This is where the user files are stored. Each user has its own folder where personal files, user configuration files per application are stored.

/lib Folders

Here are the shared library files. These are the libraries required to run the system.

/media

A place to mount external removable media devices such as USB thumb drives that may be connected to the host.

/mnt

You will find other mounted hard drives here. These are the drives you’ll have to mount manually.

/opt

The optional folder where vendor applications can store their files.

/proc

System Process and resources. Each Process that runs on your computer will have its own unique ID..

/root

Now, this is different from the / directory. You can see it as the root user home directory.

/run

This folder stores the processes that run on your RAM. it is gone when rebooted.

/sbin

System binary files. These are executables used for system administration.

/srv

Here’s is where the server data is stored.

/sys

Virtual file system. These are the files that are used to interact with the kernel.

/tmp

This is the directory where applications save their temporary files. Note that any files in this directory can be deleted at any time without any notice.

/usr

consists of several sub-directories that contain additional UNIX commands and data files. This folder used to be the default location for user home directories. but now it’s used for shareable, read-only files, including executable binaries and libraries, man files, and other types of documentation.

/var

Files that are expected to grow (vary) in size are stored here.

This can include things like log files, MySQL, and other database files, web server data files, email inboxes, and much more.

0 0 vote
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments