In this article, we explain the folders in the Linux file system and their functions. Folders in the Linux file system have been a matter of curiosity, especially for those who are new to the Linux universe.
Folders and Functions in the Linux File System
There are different folders with different names compared to other operating systems. With this article, we will eliminate all the question marks in your mind about these folders.
Why are the folders and structure of the Linux file system different compared to Windows and macOS?
To answer this question, we must first look at the history of Linux. Linux, UNIX was written and inspired by UNIX is a computer in the room covering the size 60-70’l year, hundreds of users to connect to an operating system designed taking into consideration. In those years, massive and multiple storage units, such as tape drives, were used in computers.
We currently use this system on our computers and even on our mobile phones, and these modern devices have one or two storage units. But we can perform the same functions as computers of years ago. Therefore, the UNIX principle is still valid, and the faster the computers are, the faster they run.
Linux folders overview
Seeing these folders on a diagram will help us understand their functions better.
To make changes to folders other than the root directory and the “home” folder, you need the root account privileges. You can use the “sudo” command for this, or if you are going to do a long process, you will use the root account’s privileges as long as the terminal is open by typing “sudo su”.
We should not confuse our root directory with the root user (root, superuser) on UNIX and Linux systems. One is the directory containing all the files and folders, while the other is the user account that has all the rights of the system.
As seen in the diagram above, there is a directory named “ / ” at the top. This directory is our root directory. The root directory is the main directory in which all folders reside.
Your entire computer, from devices to your documents, is under this directory. Because UNIX ‘s main areas of the system that a file of everything ( everything is a file ) principle has been adopted.
Inside this folder are the applications we have installed (or come with our system). You can run these applications via the terminal or any menu.
Again, it is an application folder like “bin” but it contains system applications. Most known commands are the applications here.
It contains the files your computer needs to get started. Tools such as your Linux kerne, bootloader, and Memtest86 + are located in this folder.
In the old days of Linux, it was a folder where we can see its contents when a CD is inserted into the CD drive, now it is only used for backward compatibility because the ” media ” folder is used instead.
This folder contains devices connected to your computer. As you may remember, we mentioned that everything is a file in systems working with UNIX principle.
This folder is particularly useful if you are going to print data from one device to another device using the DD method.
Your configurations are hosted in this folder. A folder you will visit frequently whenever you want to change a setting.
It is a folder that contains personal data of users such as documents, music, videos, pictures and desktop.
Folders starting with “lib”
These folders contain the library files. Like the DLL system in Windows, UNIX systems have a ” shared library ” system.
The folder in which the contents will automatically appear when you insert a storage unit.
It is a directory preferred by some closed source software to host their own files.
Temporary files are found and usually deleted when the system restarts.
In this folder, you can find almost everything you are looking for. Most things from icon packs to “shared libraries” are here.
Some users think that this folder is a user folder because of its name, but it is not a user folder, it is an abbreviation for ” universal system resources “.
In this folder, you will be able to find files such as logs and backups. Some people prefer to put this in another segment.
If you want to work on Linux, it might be a good idea to start with UNIX basics. So you can have a general idea about operating systems.