How Does the Linux Directory Structure Work? Find Out!
If you like to better understand how operating systems work, you must have wondered how the Linux directory structure works, right?
This is a very common question and, it should be noted, a very important one.
After all, understanding topics such as:
- what a Linux directory is;
- what the differences are compared to Windows;
- and what are, in fact, the main Linux directories.
If you want to better understand how this entire universe works, just continue reading! The Certificação Linux team has developed this complete content, with everything you need to know about the topic. Follow along!
What is a Linux directory?
A Linux directory is simply a file, which is distributed in a hierarchical form. There are several directory structures, with the "root" as the root, or main one (given by the "/" symbol).
From it, other files and main commands can be opened, viewed and organized, triggered by specific commands that identify them.
To find specific files, such as binary structures, for example, there is the "/bin" command. With it, all results matching the search will be shown.
Differences in the Linux directory structure compared to Windows
In the Windows operating system, the directory structure also exists and serves the same purpose: to organize and facilitate access to all files present in the system and their respective folders.
However, the difference lies in the way they were developed. Windows, for example, emerged during the era of microcomputers, when several hard drive partitions began to exist and be used, such as C: and D:, and are initialized along with the OS.
Linux, on the other hand, depends on its Linux partitions to be created and activated, managing the "bootable" system.
This advantage of Linux makes the Linux directory structure flexible and activated locally, without necessarily needing to define a partition to run it.
This makes Linux simpler to understand and work with, starting with the root system (or root "/"), which features some specific directories, with different functionalities, as you will see below.
Understanding the main Linux directories

The main Linux directories are those most used and most useful in the daily life of an IT professional. To check which 6 main ones we have selected, just see below!
1. (/) Root
The Root directory, also known as "Raiz" (its literal translation from English), is represented by the backslash command (/). It is within it that all other directories and commands are located.
In a directory hierarchy, it is the main one, which encompasses any other. Thus, only the user with administrator access, the user profile "root", can make modifications and create new files.
This way, human errors are avoided and important information is not at risk of being modified or even deleted from the root directory.
2. /bin
The /bin, in turn, represents the location of all binary files, that is, commands to execute essential system functions.
Only with it is it possible to explore the text and network resources of the operating system. It is important to remember that, due to this characteristic, /bin stores all executable files, that is, which any system user can use.
Some important components of the Linux Shell can be found here, such as bash, and activated by specific commands.

3. /sbin
Similar to /bin, /sbin also includes directories that can be executed, but administrators of the structure use it only to make specific changes to the system.
As it represents a set of executable applications, it is entirely possible to monitor systems and networks, as well as change disk partitions and configurations (hard disk or HDD).
With its help, hardware items and other software can be administered and kept secure. An example is the ability to address IPs correctly.
4. /usr
Most applications and software stored in /usr are available to all users, regardless of their permission level.
There are several executable files that allow source code copying actions. This directory can be executed in conjunction with the two previous ones, as follows:
- /usr/bin: which contains all binary files (triggered by /bin), which can be viewed by any user, not just the administrator;
- /usr/sbin: shows only the binary files that are essential to the administrator, to which only he has access.
5. /etc
If you need to configure any file or software, the information will be here, in /etc. Even solutions for DNS are found in this directory.
Additionally, if you want to stop or start any system through exclusive scripts, just look for them here.
6. /lib
As you probably already know, there are several command libraries that can be activated as shortcuts. They are located in the /lib directory.
If you came from the Windows universe, you should know that this directory is very similar to System, or System32, as it is also called.
Commands for creating and manipulating directories in Linux

Perhaps you're wondering how it's possible to manipulate and change Linux directories. The truth is that the CLI (Command-line interface) option is the most recommended in this case.
This means that the commands are activated in a terminal, which serves as the interface or "bridge" between the user and the Linux kernel, or its "essence".
Check out this list of commands that can be very useful in your daily work:
- mkdir: create file directories (or a sequence of them);
- rmdir: remove a specific directory (or more, depending on your needs);
- rm: to remove specific information within the file system;
- mv: to move files or rename them;
- cp: responsible for copying files from specific directories, in addition to being very useful when making backups of system information and replicating them to another directory.
This information is just the "tip of the iceberg" and you can study it in much more depth.

The best way to do this is with the help of our online courses. Linux Certification features only the best materials on the teaching platform for you to learn Linux.
A professor with decades of experience in the field will be your tutor, conveying the information in the simplest, most didactic, and clear way possible.
Furthermore, you will be part of an amazing community with over 14 thousand students. This contact can open many doors in your career, as well as prepare you for the main Linux certifications on the market.
It's worth checking out and testing our 7-day free trial proposal. You won't regret joining the community and having access to the professor to clarify all your questions!
Learn much more about Linux in our online course. Enroll with a 7-day free trial!
That was just one piece. The course teaches the whole path — from your first command to exam day.