• About Us
  • Announce
  • Privacy Policy
  • Contact us
MasterTrend News
  • Home
    • BLOG
    • TECHNICAL SERVICE
    • STORE
  • Tutorials
  • Hardware
  • Gaming
  • Mobiles
  • Security
  • Windows
  • AI
  • Software
  • Networks
  • News
  • en_USEnglish
    • es_ESSpanish
    • pt_BRPortuguese
    • fr_FRFrench
    • it_ITItalian
    • de_DEGerman
    • ko_KRKorean
    • jaJapanese
    • zh_CNChinese
    • ru_RURussian
    • thThai
    • pl_PLPolish
    • tr_TRTurkish
    • id_IDIndonesian
    • hi_INHindi
    • arArabic
    • sv_SESwedish
    • nl_NLDutch
No result
See all results
  • Home
    • BLOG
    • TECHNICAL SERVICE
    • STORE
  • Tutorials
  • Hardware
  • Gaming
  • Mobiles
  • Security
  • Windows
  • AI
  • Software
  • Networks
  • News
  • en_USEnglish
    • es_ESSpanish
    • pt_BRPortuguese
    • fr_FRFrench
    • it_ITItalian
    • de_DEGerman
    • ko_KRKorean
    • jaJapanese
    • zh_CNChinese
    • ru_RURussian
    • thThai
    • pl_PLPolish
    • tr_TRTurkish
    • id_IDIndonesian
    • hi_INHindi
    • arArabic
    • sv_SESwedish
    • nl_NLDutch
No result
See all results
MasterTrend News
No result
See all results
Start Tutorials

The Linux Directory Structure, Explained

MasterTrend Insights by MasterTrend Insights
February 20, 2025
in Tutorials
Reading time:Lectura de 14 minutos
TO TO
0
How to Install Linux in 3 Easy Steps (Without Erasing Windows)
2
SHARED
5
Views
Share on FacebookShare on Twitter

Contents

  1. The Linux directory structure, explained.
  2. / – The root directory
  3. /bin – Essential user binaries
  4. /boot – Static boot files
  5. /cdrom – Historical mount point for CD-ROM
  6. /dev – Device files
  7. /etc – Configuration files
  8. /home – Home folders
  9. /lib – Essential shared libraries
  10. /lost+found – Recovered files
  11. /mnt – Temporary mount points
  12. /opt – Optional packages
  13. /proc – Process and kernel files
  14. /root – Root home directory
  15. /run – Application state files
  16. /sbin – System administration binaries
  17. /snap – Storage for Snap packages
  18. /srv – Service data
  19. /tmp – Temporary files
  20. /usr – User binaries and read-only data
  21. /var – Variable data files
    1. Related Posts

The Linux directory structure, explained.

The Linux directory structure is fundamental to understanding how this powerful operating system widely used on servers and personal computers works.

In Linux, everything starts with the root directory, symbolized by a forward slash (/), which acts as the starting point from which all other directories branch.

Within this hierarchy, we will find essential directories such as /bin, which contains basic system executables, and /etc, where critical configuration files are stored.

The directory /home It is particularly important for users as it houses their personal files and settings.

Another key directory is /var, which saves variable files such as system logs and print queues.

Understanding how these directories are organized not only makes system navigation and management easier, but is also crucial to security and efficiency when managing Linux servers.

This hierarchical and logical structure not only optimize the system's performance, but also allows for easy scalability and customization, features that make Linux a popular choice among developers and system administrators in Argentina and around the world.

If you come from Windows, the Linux filesystem structure can seem particularly strange.

The C:\ drive and drive letters are gone, replaced by / and cryptic-sounding directories, most of which have three-letter names.

The Hierarchy Standard of the file system (FHS) defines the structure of file systems in Linux and other similar operating systems UNIXHowever, Linux filesystems also contain some directories that are not yet defined by the standard.

/ – The root directory

Everything on your Linux system is located in the / directory, known as the root directory. You can think of the / directory as being similar to the C: directory on your computer. Windows, but this is not strictly true, as Linux does not have drive letters. While another partition would be located at D: in Windows, this other partition would appear in another folder in / on Linux.

The root directory in a file explorer in Ubuntu Linux.

/bin – Essential user binaries

The /bin directory contains essential user binaries (programs) that must be present when the system is mounted in single-user mode. applications Like Firefox, if not installed as Snaps, they are stored in /usr/bin, while important system programs and utilities, such as the bash shell, are located in /bin. The /usr directory may be stored on another partition. Placing these files in the /bin directory ensures that the system will have these important utilities even if no other file systems are mounted. The /sbin directory is similar: it contains binary files essential for system administration.

The bin directory in a file explorer in Ubuntu Linux.

/boot – Static boot files

The /boot directory contains the files needed to boot the system. For example, the GRUB bootloader files and your Linux kernels are stored here. However, the bootloader configuration files are not located here; they are in /etc with the other configuration files.

/cdrom – Historical mount point for CD-ROM

The /cdrom directory is not part of the FHS standard, but you will still find it on Ubuntu and other operating systems. It is a temporary location for CD-ROMs inserted into the system. However, the standard location for temporary media is within the /media directory.

/dev – Device files

Linux exposes devices as files, and the /dev directory contains a number of special files that represent devices. These are not actual files as we know them, but they appear as files. For example, /dev/sda represents the first SATA drive in the system. If you want to partition it, you can launch a partition editor and tell it to edit /dev/sda.

This directory also contains pseudo devices, which are virtual devices that do not actually correspond to the hardwareFor example, /dev/random produces random numbers. /dev/null is a special device that produces no output and automatically discards all input; when you pipe the output of a command to /dev/null, you discard it.

The development directory in a file explorer in Ubuntu Linux.

/etc – Configuration files

The /etc directory contains configuration files, which can usually be edited manually in a text editor. Note that the /etc/ directory contains system-wide configuration files. User-specific configuration files are located in each user's home directory.

/home – Home folders

The /home directory contains a home folder for each user. For example, if your username is bob, you have a home folder located at /home/bob. This home folder contains the user's data files and user-specific configuration files. Each user only has write access to their own home folder and must be granted elevated permissions (become root) to modify other files on the system.

The home directory in a file explorer in Ubuntu Linux.

/lib – Essential shared libraries

The /lib directory contains libraries needed by essential binaries in the /bin and /sbin folders. Libraries needed by binaries in the /usr/bin folder are located in /usr/lib. You will also see a counterpart /lib64 folder on 64-bit systems.

/lost+found – Recovered files

Every Linux filesystem has a lost+found directory. If the filesystem fails, a filesystem check will be performed at the next boot. Any corrupt file found will be placed in the lost+found directory, so you can try to recover as much data as possible.

The /media directory contains subdirectories where removable media devices inserted into the drive are mounted. computerFor example, when you insert a CD into your system Linux, a directory will be automatically created inside the /media directory. You can access the contents of the CD inside this directory.

/mnt – Temporary mount points

Historically speaking, the /mnt directory is where system administrators would mount temporary filesystems while they were using them. For example, if you are mounting a partition on a Windows to perform some recovery operations filesystems, you can mount it on /mnt/windows. However, you can mount other filesystems anywhere on the system.

/opt – Optional packages

The /opt directory contains subdirectories for packages software optional. It is commonly used by software proprietary file that does not obey the standard file system hierarchy. For example, a proprietary program might dump its files into /opt/application when you install it.

/proc – Process and kernel files

The /proc directory is similar to the /dev directory in that it does not contain standard files. It contains special files that represent system and device information. process.

The proc directory in a file explorer in Ubuntu Linux.

/root – Root home directory

The /root directory is the home directory of the root user. Instead of being located at /home/root, it is located at /root. This is distinct from /, which is the root directory of the system.

/run – Application state files

The /run directory gives applications a standard place to store transient files they need, such as sockets and device IDs. processes. These files cannot be stored in /tmp because they may be deleted.

/sbin – System administration binaries

The /sbin directory is similar to the /bin directory. It contains essential binary files that are generally intended to be run by the root user for system administration.

The sbin directory in a file explorer in Ubuntu Linux.


/snap – Storage for Snap packages

Another directory that isn't part of FHS but is common to see these days is /snap. It contains installed Snap packages and other files associated with Snap. Ubuntu now uses Snaps by default, but if you're using a different distribution that doesn't, you won't see this directory.

/srv – Service data

The /srv directory contains "data of the services provided by the system. If you were using the Apache HTTP Server to serve a website, you would probably store your website files in a directory within the /srv directory.

/tmp – Temporary files

The applications They store temporary files in the /tmp directory. These files are usually deleted every time the system is rebooted and can be removed at any time using utilities such as systemd-tmpfiles.

/usr – User binaries and read-only data

The /usr directory contains applications and files used by users, as opposed to applications and files used by the system. For example, non-essential applications are located within the /usr/bin directory instead of the /bin directory, and non-essential system administration binaries are located in the /usr/sbin directory instead of the /sbin directory. Libraries for each are located within the /usr/lib directory. The /usr directory also contains other directories. For example, architecture-independent files such as graphics are located in /usr/share.

The /usr/local directory is where the applications compiled locally by default. This prevents them from breaking the rest of the system.

The usr directory in a file explorer in Ubuntu Linux.

/var – Variable data files

The /var directory is the writable counterpart to the /usr directory, which should be read-only during normal operation. Log files and everything else that would normally be written to /usr during normal operation are written to the /var directory. For example, you'll find log files in /var/log.


For more detailed technical information about the Linux file system hierarchy, see the Filesystem hierarchy standard documentation.

Share this:
21FacebookLinkedInPinterestXRedditTumblrBlueskyThreadsShare
21
SHARES

Related Posts

  • How often should you turn off your phone?
  • Mac Boot Keys
  • Android 13 several operators one eSIM
  • XK800 Mechanical Keyboard
  • 30 amazing games for Intel integrated video
  • Chinese and Iranian Hackers Use ChatGPT in Cyberattacks
  • Bjorn: Computer Security Tamagotchi on Raspberry Pi
  • MIT unveils 3D nanoscale transistors
Tags: PCTipsEvergreen ContentTechTips
Previous Post

Best Diagnostic Tools for Windows 10/11

Next publication

Goal with the US government to use Llama AI

MasterTrend Insights

MasterTrend Insights

Our editorial team shares in-depth reviews, tutorials, and recommendations to help you get the most out of your digital devices and tools.

Next publication
Goal with the US government to use Llama AI

Goal with the US government to use Llama AI

5 2 votes
Article Rating
Subscribe
Access
Notify of
guest
guest
0 Comments
Oldest
Newest Most voted
Online Comments
See all comments

Stay Connected

  • 976 Fans
  • 118 Followers
  • 1.4k Followers
  • 1.8k Subscribers

Don't miss the latest in technology and gaming.
Exclusive tips, how-to guides, and analysis every day.

Subscription Form
  • Tendencies
  • Comments
  • Last
12 Best Alternatives to Lucky Patcher for Android

Lucky Patcher Alternatives: 12 Better and Easy Apps! 🎮⚡

May 12, 2025
How to add a clock to the Windows 11 desktop: 3 surefire tricks!

How to add a clock to your Windows 11 desktop: Get more done in minutes! ⏱️

May 1, 2025
How to use AdGuard DNS on Android in 2024

How to use AdGuard DNS on Android in 2025

February 11, 2025
How to force 4G LTE only mode on Android

How to force 4G LTE only mode on Android in 2025

February 10, 2025
Gmail Features on Android: Save Time with 5 Tips

Gmail Features on Android: 5 Tricks You Didn't Know About! 📱✨

12
Motherboard repair - Repair Motherboards

Notebook Motherboard Repair

10
Install Windows 11 Home without Internet

Install Windows 11 Home without Internet

10
How to Back Up Drivers in Windows 11/10 in 4 Steps!

How to Back Up Drivers in Windows 11/10: Avoid Errors! 🚨💾

10
YouTube Shorts to MP4 - Young woman smiling while holding a tablet displaying the YouTube play button logo, representing YouTube Shorts to MP4 video conversion.

YouTube Shorts to MP4: Top 5 Fast and Free Tools 🔥⚡

July 21, 2025
Linux on modern PCs - Alt text: "Modern laptop with screen showing rising graph and jumping Linux Tux mascot, symbolizing the growth and adoption of Linux on modern PCs."

Linux on Modern PCs: 5 Distros to Boost Your PC

July 21, 2025
Another instance is already running - Alt text: Computer error pop-up window with the message "Another instance is running" and warning of configuration system initialization failure, with OK button visible, on a dark background with the text "How to fix the error message."

"Another instance is already running": How to fix this error NOW!

July 21, 2025
Asus ROG Zephyrus G16 2025 Hybrid king of play and work? - Alt text: "Asus ROG Zephyrus G16 2025 sleek black gaming laptop partially open on wooden desk with glowing diagonal light strip on lid, designed for hybrid gaming and work performance."

Asus ROG Zephyrus G16 2025: RTX 50-Series power in a slim 16"! ⚡🔥

July 21, 2025

Recent News

YouTube Shorts to MP4 - Young woman smiling while holding a tablet displaying the YouTube play button logo, representing YouTube Shorts to MP4 video conversion.

YouTube Shorts to MP4: Top 5 Fast and Free Tools 🔥⚡

July 21, 2025
6
Linux on modern PCs - Alt text: "Modern laptop with screen showing rising graph and jumping Linux Tux mascot, symbolizing the growth and adoption of Linux on modern PCs."

Linux on Modern PCs: 5 Distros to Boost Your PC

July 21, 2025
4
Another instance is already running - Alt text: Computer error pop-up window with the message "Another instance is running" and warning of configuration system initialization failure, with OK button visible, on a dark background with the text "How to fix the error message."

"Another instance is already running": How to fix this error NOW!

July 21, 2025
12
Asus ROG Zephyrus G16 2025 Hybrid king of play and work? - Alt text: "Asus ROG Zephyrus G16 2025 sleek black gaming laptop partially open on wooden desk with glowing diagonal light strip on lid, designed for hybrid gaming and work performance."

Asus ROG Zephyrus G16 2025: RTX 50-Series power in a slim 16"! ⚡🔥

MasterTrend News logo

MasterTrend Info is your go-to source for technology: discover news, tutorials, and analysis on hardware, software, gaming, mobile devices, and artificial intelligence. Subscribe to our newsletter and don't miss any trends.

Follow us

Browse by Category

  • Gaming
  • Hardware
  • AI
  • Mobiles
  • News
  • Networks
  • Security
  • Software
  • Tutorials
  • Windows

Recent News

YouTube Shorts to MP4 - Young woman smiling while holding a tablet displaying the YouTube play button logo, representing YouTube Shorts to MP4 video conversion.

YouTube Shorts to MP4: Top 5 Fast and Free Tools 🔥⚡

July 21, 2025
Linux on modern PCs - Alt text: "Modern laptop with screen showing rising graph and jumping Linux Tux mascot, symbolizing the growth and adoption of Linux on modern PCs."

Linux on Modern PCs: 5 Distros to Boost Your PC

July 21, 2025
  • About Us
  • Announce
  • Privacy Policy
  • Contact us

Copyright © 2025 https://mastertrend.info/ - All rights reserved. All trademarks are property of their respective owners.

es_ES Spanish
es_ES Spanish
en_US English
pt_BR Portuguese
fr_FR French
it_IT Italian
ru_RU Russian
de_DE German
zh_CN Chinese
ko_KR Korean
ja Japanese
th Thai
hi_IN Hindi
ar Arabic
tr_TR Turkish
pl_PL Polish
id_ID Indonesian
nl_NL Dutch
sv_SE Swedish
No result
See all results
  • en_USEnglish
    • es_ESSpanish
    • pt_BRPortuguese
    • fr_FRFrench
    • it_ITItalian
    • de_DEGerman
    • ko_KRKorean
    • jaJapanese
    • zh_CNChinese
    • ru_RURussian
    • pl_PLPolish
    • id_IDIndonesian
    • tr_TRTurkish
    • hi_INHindi
    • thThai
    • arArabic
    • sv_SESwedish
    • nl_NLDutch
  • Gaming
  • Hardware
  • AI
  • Mobiles
  • News
  • Networks
  • Security
  • Software
  • Tutorials
  • Windows

Copyright © 2025 https://mastertrend.info/ - All rights reserved. All trademarks are property of their respective owners.

Comment Author Info
:wpds_smile::wpds_grin::wpds_wink::wpds_mrgreen::wpds_neutral::wpds_twisted::wpds_arrow::wpds_shock::wpds_unamused::wpds_cool::wpds_evil::wpds_oops::wpds_razz::wpds_roll::wpds_cry::wpds_eek::wpds_lol::wpds_mad::wpds_sad::wpds_exclamation::wpds_question::wpds_idea::wpds_hmm::wpds_beg::wpds_whew::wpds_chuckle::wpds_silly::wpds_envy::wpds_shutmouth:
wpDiscuz
RedditBlueskyXMastodonHacker News
Share this:
MastodonVKWhatsAppTelegramSMSHacker NewsLineMessenger
Your Mastodon Instance