How is the Linux file system structure made up? - Part 1

directory-tree-so-linux

Many of the readers who came to use Windows and they are migrating to Linux, they won't let me lie then The first question or problem that arises is "where are the programs stored in Linux".

Unlike Windows, Linux is made up of a completely different and alien file system, here there are no drive letters such as “C: \. D: \, etc ”, as this is not the standard for the FHS File System Hierarchy.

This system defines the structure of file systems in Linux and other UNIX operating systems. However, the Linux file system also contains some directories, which until now have not been defined as follows.

/ - root directory (root)

Everything on your Linux system is located in the / directory, also known as the root directory.

This directory it is as if we are talking about "C: \ in Windows" so to speak, but, this is not the case, since in Linux there are no letters in the names of the drives.

/ bin - user binary files

The / bin directory contains the user binaries (programs) that must exist when the system is operating in single user mode.

Importantly, no more directories can and should not exist in this directory, here! we will only find the binary files of the programs, as well as their symbolic links that can be distinguished by an "@".

/ boot - system boot files

The / boot directory It contains the files needed to boot the system, for example GRUB and Kernel files are stored here.

The kernel of the system can be identified as an image file called vmlinuz-version _ kernel) must be located in this directory or in the root directory.

/ cdrom mount point for CD-ROM

The / cdrom directory it is not a part of the FHS filesystem as such, but can still be found in various distributions.

This directory is a temporary place for your CD / DVD drive from your computer on your system. However, the standard location for temporary media devices is the / media directory

/ dev device files.

Linux sees devices as files, and the / dev directory contains special files that represent devices. It is not exactly these types of files as we are used to seeing them.

Also, it is important to know that the devices can be block or character. Normally, block devices are those that store data and character devices that transfer data.

Basically here we can find the mounting points of other partitions or devices connected to the computer.

E.g. / Dev / sda is the mount point of the hard disk in use and the other partitions of this will be listed in such a way that the first partition will be / dev / sda1, second / Dev / sda2 and so on.

In the case of other disks, pen drives or connected storage devices, we will identify them as / dev / sdb, / dev / sdc and so on.

We can check this from the terminal by executing the command:

sudo fdisk -l

While for the file associated with the mouse type PS / 2 will / dev / psaux.

/ etc - configuration files

The / etc directory contains configuration files that can be edited manually using a text editor.

Note that the / etc directory contains important system files, they are all configurations, which are static files.

Executable files, much less binary files, should never be found here.

/ home - user's home folder

The / home directory contains the home folders of all users. For example, if your username is "user1", then they will have / home / user1 as their home directory.

This folder contains user files and user-related data, as well as user files and preferences.

Each user has only write access to their home directory, and to modify other files on the system they would need to have super user permissions or be a root user.

/ lib system libraries

The / lib directory it contains libraries needed by the binaries that are located in the / bin and / sbin directories.

With only one difference, that the libraries needed by the binaries in the / usr / bin folder are in the / usr / lib directory.


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

3 comments, leave yours

Leave a Comment

Your email address will not be published.

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Quantum Computing1 said

    Although I have this field I have it more or less controlled, a small explanation is appreciated as a review.

    Good work, and thank you!

  2.   leo said

    Thanks a lot. I always wondered how that structure works

  3.   Marco Antonio Correa said

    Thank you very much for this information !!