This post summarizes what I have learned about the most common Linux directories and how they are used in a typical system.
/ - Root Directory
The root directory is the starting point of a Linux filesystem.
All other directories and files are exist under this directory.
/bin - Binaries
The bin directory contains essential commands that are required for basic system operations.
Some examples:
ls
cd
cp
mv
rm
/dev - Device Files
This directory only contains special files, including those relating to the devices. These are virtual files, not physically on the disk.
/dev/null
This line of code can be sent to destroy any file or string.
/dev/zero
This line of code contains an infinite sequence of 0.
/dev/random
This line of code contains an infinite sequence of random values.
/etc - Configuration Files
This directory contains the core configuration files of the system, use primarily by the administrator and services, such as the password file and networking files.
/usr - User System Resources
This directory contains most installed software and user-level programs.
Common subdirectories include:
/usr/bin - contains basic user commands.
/usr/sbin - contains additional commands for the administrator.
/usr/lib - contains the system libraries.
/usr/share - contains documentation manual pages.
/home - User Home Directories
This directory contains personal directories for regular users.
Example:
/home/Downloads
/lib - Shared Libraries
These directories store shared libraries required by system binaries in /bin and /sbin.
They are essential for the system to boot and function properly.
/sbin - System Administration Command
This directory stores system administration commands, mainly used by the root user.
These commands are related to system maintenance, startup, and recovery.
Examples:
reboot
shutdown
fsck
/tmp - Temporary Files
This directory is used for temporary files created by applications and users.
Files stored here are usually deleted automatically when the system restarts.
/var - Variable Data
This directory stores data that changes over time while the system is running.
Common Examples:
/var/log - System logs
/var/cache - Cache files
/var/spool- Spool files
This directory is important for troubleshooting and system monitoring.
/proc - Process Information
The /proc directory is a virtual filesystem that provides information about running processes and the kernel.
Example:
/proc/cpuinfo
It is commonly used to inspect system status and performance.
/opt - Optional Software
This directory is used for optional or third-party software that is installed outside the standard system directories.
/mnt & /media - Mount Points
These directories are used to mount filesystems:
/mnt is typically used for temporary or manual mounts.
/media is used for automatically mounted removable devices such as USB drives.
/srv - Service Data
This directory contains data for services provided by the system. For example, if you run a HTTP server, it’s a good practice to store the website data in the /srv directory.
Learning the Linux directory hierarchy helped me understand how Linux organizes system files, user data, and configuration.
For beginners like me, this knowledge is essential for Navigating the filesystem and Understanding system behavior.
Tomorrow, I will study How to edit files in Linux using vim to better understand how configuration and system files are managed.

Top comments (4)
Your learning posts feel a bit thin to me — they skim the surface without going much deeper than what
man hieralready tells you. Instead of just summarizing what you picked up, try building proper documentation for yourself that also gives the community something they can't get faster elsewhere. I'm someone who tends to overinvest in these things, but once it's done, it's done — and you'll actually come back to it.One aspect worth expanding on is
/opt. It's not just a dumping ground for third-party software. The Filesystem Hierarchy Standard (FHS) actually specifies a complete hierarchy around it: software in/opt/<name>/should keep its configurations in/etc/opt/<name>/and variable data in/var/opt/<name>/.Surprisingly, almost nobody follows this convention, which is precisely why it's worth highlighting. The separation exists for the same reasons
/etcand/varare split from/bin: to ensure predictability and facilitate clean system management.I already feel like a salesman for the FHS at this point, but please — just read the actual spec. It's not that long, and it's well-written. It delves into the why behind each directory, not just the what, which is where things truly click:
Most posts on this topic just reword the docs without adding clarity or new insight while losing a ton of information and background.
Sorry, man, I didn't think you woud write something here too. I'm already screwed to reply this as well. Go study someone else. I can't take it no more. You're a psychopath FHS maniac 😂. I haven't make it to gather my forces for a reply. You win. You got it 😭
Don't take my comments too seriously — I'm a 300% emo sysadmin who fantasizes about
rm -rf /planetat least twice before lunch. I don't actually mean any of it in a bad way. I probably hate every OS more or less. I'm a perfectionist who hates everything, including myself, but that's a therapy topic.Honestly, I should go back to my millennia-long strategy of not existing publicly and not giving a single fuck about comment sections. I anyway have no time for this shit. I would love to duplicate myself like a few dozen times, but then I think this through and in the end I’m unsure if that would not end with all of me dead. 🌈🪦
I'll read your longer response after I squeeze in 1-2 hours of sleep before work, you know, the healthy kind of schedule that definitely isn't killing me.
Oh, and for the record: I hate winning arguments. I want to be slapped with facts and proven wrong. 😭😆
Edit: Not bad, it only took me "a few days" to notice this and react. For context, I've been procrastinating setting up my own mail server from scratch for at least 2 years now, so by my standards this is lightning-fast response time.
If I don't reply to your longer comment soon, I will read it, latest in a few days if I forget later. But sometimes I hit that mode where I physically cannot move on until I've spent 7 hours crafting the perfect reply to a single comment.
Anyway, stay tuned. Or don't. I'll show up eventually like a sysadmin patch that's 6 months overdue.
Hello again. I might be wrong, but reading you felt heavier than just “emo sysadmin jokes”. If I’m projecting — ignore this part.
I’ve been in a similar headspace before, especially around 2023. The sleep deprivation, perfectionism, constant pressure to be “right”, the self-criticism — it can slowly eat you alive while you’re still functioning on the surface. It doesn’t look dramatic, but it drains everything.
The way you describe your schedule and mindset sounds exhausting. When sleep becomes optional and everything turns into a performance or a battle, it’s not sustainable long term. I’m not saying this as an outsider — I’ve burned myself that way before.
About the job — maybe it’s just burnout. Maybe it’s not. But when work starts feeling like punishment instead of challenge, that’s usually a signal, not weakness. I tried pushing through something that wasn’t really mine, and it only got worse until I stopped.
Same with procrastination. Sometimes it’s laziness. Sometimes it’s your mind refusing to keep hurting itself. Took me a long time to tell the difference.
Also, if you say you “hate winning arguments” and want to be slapped with facts — that sounds more like wanting clarity than wanting conflict. That’s actually healthy.
I don’t know you well enough to judge anything. Maybe I’m overreading. But if any part of this resonates — consider talking to someone offline. It helped me more than I expected.
And regardless of OS preferences or comment sections — you’re allowed to exist publicly. Even imperfectly. Especially imperfectly.
Some comments may only be visible to logged-in visitors. Sign in to view all comments. Some comments have been hidden by the post's author - find out more