Linux directories: what are the main folders of each distribution

Although very few people use it as a computer operating system, many may be surprised that, in reality, the heart of Linux is present in many devices that we use every day.
As explained in the past, Linux is the central part of Android, the most popular operating system on smartphones, TVs, Smartwatches, Box TVs and many other devices.
When you use a GNU / Linux operating system, the system folders may blow you away, given the profound difference compared to the folders you are used to dealing with on Windows.
Putting your hands in the system folders on Windows is already inadvisable, let alone when using a Linux system!
This does not mean completely ignoring the existence of system folders on Linux, in particular if you have a problem or are looking for a particular file, knowing the hierarchy and the use of the folders as they are used, the system will allow you to immediately understand where to find the "executable" files of the Linux world, where the configuration files are present and where you can find the drivers.
Even for those who are more curious and for those who want to learn something new we see here how to "read" and understand the differences of the Linux system directories that we can also see in Android (only after having rooted), in popular systems such as Ubuntu and Chrome OS.
In this guide I will show you which directories are present in Ubuntu or any modern GNU / Linux distribution you use, to always know what to do and where to look for important files since the folders are identical for everyone.
READ ALSO: The 10 most used Linux Distros in the world
Linux directories: premise
To fully understand how Linux works you have to start from an important premise: everything is managed through files, even when you talk about peripherals and PC components.
If you have a problem with WiFi you will most likely have to get hold of a file, as well as to update the video card driver (also a file), the hard disk (managed via a file) and the DVD burner (also present as a file).
These files are not placed in random order, but follow the strict hierarchy imposed by Linux systems, so if you know the nature of the problem and know exactly in which folder you can find the right file, solving problems on Linux could become much easier.
It is obviously not all within the reach of the common user, but if you want to learn and get to know a new operating system, understanding the hierarchy of folders is certainly one of the "weapons" that you can use to get to know a GNU / Linux system even better.
NOTE: to simplify the understanding of the following folders, it is important to know that the symbol / identifies the "root", ie the primary space on the disk or on the partition where Linux is present; it therefore corresponds to the C: \ Windows folder.
If you see / already know that you have to open the hard drive folder or the Linux system partition to see the folders it contains.
Linux directories: user folders
User folders are those where you can find user profiles created by the operating system, with related personal files (documents, photos, videos) and program customizations.
There are two user folders in Linux:
- / home : the folder with all users with standard permissions
- / root : the folder with the user with the maximum administrative permissions
In the first folder you will find as many subfolders as there are profiles on the system.
If you create a user called "Rocco", here you will find a Rocco folder with all user folders for personal files and (as hidden folders) the configuration paths of the installed programs.
Root is a particular folder reserved for the user with maximum administrative permissions, normally it is not accessible to normal users and contains the settings of the programs relating to the Root user.
Linux directories: program folders
When you install a new program on Linux the folders used by the system are the following:
- / usr: the folder with all the "executable" files and with part of the program configuration files
In this folder you can find various subfolders, all very useful for the operation of the programs, the most important are certainly:
- / usr / share : this folder contains application data and manuals
- / usr / bin : contains all executable files in Linux environment (binary files)
- / usr / src : here you find the kernel sources
- / lib: as the name suggests in this folder you will find the other part of the files needed to run the programs (the libraries)
- / etc : this folder contains the app and system tools settings (already present together with the operating system) -
The main subdirectory is /etc/init.d which contains all the initialization scripts for services such as networking, samba, apache, cron, hal, and so on.
- / opt : folder reserved by Linux for heavier programs, but little used by modern operating systems.
You can find some configuration files for the programs (specific for each user) in the / home folder, so if there is a program but more users on the PC, each will have its favorites, its personalizations and its configurations.
Device folders
As I mentioned, every device or peripheral on the PC is present as a file; these files are present in the following folders:
- / dev : here are the files and drivers to make the devices connected to the system work.
This directory contains all the device files, the ones that are the drivers on Windows.
On Linux all peripherals and units have a name, for example hard drives tend to be classified as hda, hdb, hdc.
Special external devices such as USB devices can be classified as sda, sdb, sdc so looking at the / dev directory you will see different files and each of them is a real or virtual device.
Peripherals on Linux differentiate between devices that hold data and devices that transmit data such as mice.
On Windows there is no such folder, the data on the installed peripherals are, a little in the registry keys and are difficult to locate and a little in files included in the C: \ Windows \ system32 \ drivers folder but on windows as well as on Linux, these files, should not be touched.
- / proc : in this folder you will find all the processes started by the processor as a file
- / mnt : here you can find (in subfolders) the storage devices, from hard disks to USB sticks passing to network folders.
If you connect an 8 GB key, an 8 GB folder will appear here with all the contents present (if present), as well as if you have mounted any partition on the hard disk.
On some operating systems you will also find a / mount folder, which does exactly the same thing.
With the contents in these folders you can keep under control all the space present on your PC (including external storage devices) and the correct functioning of the peripherals.
Other folders
There are other folders within the Linux root, but user intervention is normally not required (except in very rare cases); the folders are:
- / tmp : this folder contains all the temporary files generated by the system
- / var: this folder contains information of running programs, including system logs
- / boot: in here you can find all the files necessary for the correct boot of Linux.
You will rarely use these folders, but knowing their existence and their content will allow you to take the right actions when it is necessary to act on them, in particular to find out the nature of the problems with the programs (in the / var folder there are logs) .

Leave Your Comment

Please enter your comment!
Please enter your name here