Tap to unmute
Learning The Linux File System 2025
Embed
- Published on Mar 13, 2026
- This video will show you what's in all those directories in your Linux Machine, NOTE: I couldn't post all of the notes for this vid here... I have posted what I think is the most important info.
Linux Filesystem Basics
"Path" A path points to a file system location by following the
directory tree hierarchy. Example: /home/joe/Documents/letter_to_cindy.txt
"Permissions" File attributes that define who can access or change a file
and whether a file can be executed as a program.
"-rwxr-xr-x" Shows file type and permissions.
+-------------+------+-------+
| d--------- | File Type |
+-------------+------+-------+
| - = regular file |
| d = directory |
| l = link |
+-------------+------+-------+
| Permission | Octal| Field |
+-------------+------+-------+
| rwx----- | 700 | User |
| ---rwx-- | 070 | Group |
| -------rwx | 007 | Other |
+-------------+------+-------+
Octal values:
Read = 4
Write = 2
Execute = 1
You can set permissions in the file manager or with the commend
"chmod." Examples:
Set a file to be executable and readable by
by everyone but only writable by you:
'chmod 755 filemane'
Set execute bit without changing other permisions:
'chomd +x filename'
When applying permissions to directories on Linux, the
permission bits have different meanings than on regular files.
The write bit allows the affected user to create, rename, or
delete files within the directory, and modify the directory's
attributes. The read bit allows the affected user to list the
files within the directory. The execute bit allows the affected
user to enter the directory and access files and directories
inside.
"Root" Can refer to the base of a filesystem ("/") or a user with
administrator privileges for a Unix/Linux computer.
"Tree" A way to visualize filesystem structure.
Dir
├── Dir
│ ├── File
│ ├── File
│ └── Dir
│ └── File
├── File
└── File
Here's an explanation of some key directories:
/ (Root Directory): The top-level directory in the Linux file system hierarchy. All other directories and files are located within this directory or its subdirectories.
/bin (Binaries): Contains essential user command binaries that are available to all users, such as ls, cp, mv, and cat.
/boot: Contains files required to boot the Linux system, including the kernel and boot loader configuration files.
/dev (Devices): Contains device files, which represent hardware devices and pseudo-devices (like /dev/random for random numbers or /dev/null for discarding output).
/etc (Et Cetera): Stores system-wide configuration files for various services, applications, and the operating system itself. Examples include network settings and user authentication configurations.
/home: Contains individual user home directories. Each user typically has a subdirectory within /home (e.g., /home/username) for their personal files and user-specific configurations.
/lib (Libraries): Holds essential shared libraries required by the binaries in /bin and /sbin.
/media: A mount point for removable media devices like USB drives and CDs/DVDs.
/mnt (Mount): Another mount point for temporarily mounting file systems, often used for network file systems or other temporary mounts.
/opt (Optional): Used for installing optional or third-party software that is not part of the standard system distribution.
/proc (Processes): A virtual file system that provides information about running processes and kernel parameters. It's dynamically generated and doesn't store files on disk.
/root: The home directory for the root user (the superuser with administrative privileges).
/run: Contains volatile runtime data, such as process IDs (PIDs) and sockets. This directory is typically cleared on reboot.
/sbin (System Binaries): Contains essential system administration binaries, typically used by the root user for system maintenance tasks (e.g., fdisk, reboot).
/srv (Services): Stores data for services provided by the system, such as web server content or FTP server data.
/sys (System): A virtual file system providing an interface to kernel data structures and device information, allowing inspection and control of system behavior.
/tmp (Temporary): A directory for temporary files created by applications or users. Its contents are typically cleared on system reboot.
/usr (Unix System Resources): Contains a large portion of the operating system's files, including user programs, libraries, documentation, and header files. It's further organized into subdirectories like /usr/bin, /usr/lib, /usr/share, and /usr/local.
/var (Variable): Stores variable data that changes frequently during system operation, such as log files (/var/log), mail queues (/var/spool/mail), and temporary files for web servers (/var/www).
Leann more about the Ext file system: • Introduction to the Ex...








Geezuz H, Joe! That first video of yours 10 years ago is what got me going with Linux in general and Mint in particular. Glad to see your alive and well!!
Glad I could help you on your Linux journey! Thanks for watching!
After 25 years of windows I'm giving Linux a shot. Your videos are really helpful.
Install various versions there so many. Even make your own distribution version
I have just started my Linux journey and this is the best video I have encountered
Welcome to the Linux journey! Glad my video was helpful. :)
even a 10 year ago video is on point and clear to understand and i watched this video to refresh again
thanks
The first two things I learn about Linux was the package manager Synaptic, since I was using a Debian base distro. The second thing was Linux Filesystem Hierarchy Standard (FHS). That was 22+ years ago. I'm still using a Debian base distro today.
One of the first things I learned was how to input an AT command to dial out. Granted, not particularly Linux but the vibe is the same.
Seriously. Every time I look at a video of yours I learn something new. Great to have you back Joe!
Glad I can help! Thanks for the kind words.
Excellent remake of a previously excellent video Joe. When I first got into Linux, it was your channel that I always turned to for information like this.
Thanks for the excellent video! Very helpful!
You're very welcome!
Joe, I have been playing with"computers since the mid-70's when the TRS-80 came out.... Now at 78 I'm learning Linux and this was most educational for me. I plan on following your guidance.
Thank you for straight forward explanations.
That's awesome! Thanks for watching! :)
Play with them on a pc or live disk that u can spare extra disk space incase u decide to keep the installation
Thank you very much sir to many more Linux videos and Kali linux
You're very welcome! I appreciate the kind words.
👍🏻Taktyczny komentarz dla statystyk zawierający więcej niż siedem słów. Pozdrawiam serdecznie.
Always a great help for those who just switched over from Windows! Thanks Joe!
Thanks for watching! So glad it's helpful for new users. :)
Joe,
Thanks for this video.
Great work,
John R.
Thank
You.
Excellent timing. I randomly got sucked into diving into the Linux filesystem when I was fed up with continuously hearing about “Inodes” and never come to know what it was.
Now I know, and this video will reinforce that. Thanks!
You're welcome! Happy to help.
Just the thing I needed thank you so much great content as always
So glad it was helpful! :)
Thanks for this. It was extremely helpful, especially the mnt and media, and why some files have different t colours!
Glad it was helpful! :)
I like the way you explain things =) cheers.
Thanks, I appreciate that! :)
Thanks for the video! I am confident this video will exceed your target goal!
I appreciate that! :)
Another awesome video! Thank you!
Glad you enjoyed it!
Excellent Lecture...
I appreciate that!
been using Linux for about 1mobth now this is a great start for me
devices being files was a game changer back when i made the switch from windows. makes the connection between the OS and the hardware feel very natural and understandable.
It's definitely a unique and powerful way of handling things.
Great way to explain inodes and how inode numbers work for every partition and filesystem.
We get no space left error when we run out of allotted inode numbers even though there's enough space left on the disk.
Glad you found it helpful!
Fun Poking around in my system.
Great stuff Joe! Love your presentation style. Keep 'em coming, the longer the better.
Thanks for the kind words! :)
Great, too many people dont give new people this info. I read about it but know one says why or how it all fits together in real world application. You do, thank you. I hate being at the mercy of a GUI
Me too! Thank for watching. :)
Thank you for the video.
You're very welcome!
Yet again Joe, more great information. I'll get the hang of this yet...thanks for making it straightforward, (you know I'm going to have to watch it more than once too) Cheers!
Glad I could help! Thanks for watching!
Your way of explaining things is really cool. I wish I found you when I was first learning linux
Thanks so much! Glad I can help now.
This is a pretty good video. A nice refresher for double checking my knowledge 👍
Maybe a few old outdated (now irrelevant) concepts (like the Windows Drive Letter thing that is... very much a different story now) but... and this one seems to be opinionated as well but... pretty nice.
I also learned something already because... although I've worked with Linux for years, I didn't know that cd without an argument takes you back to your home directory. I always got sooo annoyed when a VM had the wrong keyboard layout setup, and I had to search for ~ 😂
Thanks for watching... I'm glad it met with your strict approval.
Best of the best.
Damn thanks man! literally like every a few sentence of your explanation, i would google and ask chatgpt about it to really deepen my understanding. not that your explanation were bad, your explanation is deep and amazing! just my undestanding of linux file system just not that good
btw i rarely comment in a video, so when i do. i really mean it. thanks a lot man!
Thanks for the kind words... I do the same thing if I'm really digging into something. Just stuff my brain with info and hope most of it sticks! :)
I love to send this to a fella who wants to switch to linux and watch his brain start to sizzle.
😂
Thanks for posting Joe. I wish you could do a video explaining in some detail what happens between the end of the POST and the start of init (ie systemd etc.). I have some idea but not step by step of what is occurring. Thanks again.
A lot is going on... That's a great idea for a video but it may be a little while before I get to it. :)
Our king is back! Always love the long form in depth guides on systems like this that are over most people's heads.
Thank You. I do try and simplify things to help new folks understand what's going on. I hope that makes it so it's not over too many people's heads. :)
good job
Glad you liked it! :)
Hey Joe thanks for another informative video. I like the chill, conversational style of your videos. Also, I bet you learned to use absolute paths (instead of relative paths) in scripts * the hard way*. 😧
Glad you liked it! And yes... the hard way. ;)
I just wanted to tell you, I am glad that we have a good advocate in Linux. Please stay on these good topics, I would not make debates on Linux vs Windows. There are a few youtubers that state things that its not correct or they trying to debate something that never had a taste. I think using Linux and Windows for very long time can debate on it but youtubers that never tasted it in a sense should not go off the boat. You have good topics and your videos are interested.
I appreciate the feedback! I'll definitely keep focusing on helpful Linux topics.
Anyone else feel like they're listening to Rick Beato do a deep dive in Linux filesystem?
I am Rick's alter-ego... LOL :)
I feel its been a long time since I saw one o your videos. Please keep up the Great work. Ever thought about a video on LVM ? Would look forward to that.
Thanks you for being here but I won't be doing anything on LVM ever. I hate it and think it should be abolished. LOL
When talking about permissions, I would mention that you can't write to or execute a file without read permissions. Therefore in the octal code, none of the digits should be 1, 2, or 3.
But you CAN set them that way if you want. Isn't Linux cool?
@EzeeLinux Yes true, but chances are, someone who does so will not be getting the results they expect.
Fun fact: the /usr directory was actually called the User directory, because thats where all the user home directories lived. But during the Unix development on the PDP-11 they filled up their root partition and thus leaked all the system files into the User (/usr) directory. Then later on when they got a 3rd disk, they called it /home and moved all the user home directories there. And i guess now they have retconed this to what you found. But if you look into the Linux Standard Base (LSB) specification, they still call it the User directory.
Interesting! Thanks for sharing. :)
Been using Linux and Unix going back to the DEC VAX 11/780 at U of T Computer Science in early 80's. Never discovered that /usr is not 'user'. :)
Wow, that's some serious experience! Glad you still found something new. :)
32:45 You have a typo. chomd should be written as chmod.
Good introduction 😊 to file systems. Keep it up.
DO you feel better now? LOL Pointing out a typo in a published video is a pointless waste of time but thanks anyway.
Regarding /media, I can’t remember the exact specifics, but I recall certain distros (I think Fedora / RHEL was one) using /run/media for removable devices instead of just /media. Not entirely sure why, but I just remember having to modify your bu backup script from back in the day when I wanted to use it on Fedora, because my USB drive was in /run/media instead of /media.
Also, I had always thought that /usr stood for Universal System Resources. That could make sense considering its use, but maybe I’ve been wrong all these years!
Arch based distros mount inserted media in /run. I'm not sure where RPM distros do it... I tend to stick to Debian and her children. :)
33:10
That's so funny, to me the number system seems more complicated than the letter system to me. There are three letters
r=read
w=write
x= execute
The + sign grants a right and the - sign takes it away and = you can explicitly say what rights should be granted and everything not mentioned is not granted. If you don't specify anything you are changing the right for the user that currently owns the file, but you can say u to distinguish it from group or others. If you want to change the right for the group you put g and if you want to change the right for others that neither owner nor group you put o
chmod 775 is way shorter to write but at least to me
chmod u=rwx,g=rx,o=rx is way easier to understand
It takes all kinds... :)
Thanks for the nice info Joe. I have seen the ten years old version too a few month ago, as many other videos from you. At the moment I aḿ migrating from Windows 10 to LMDE6 on an old Thinkpad T500 (Intel Core 2 Duo T9600 (2) @ 2.801GHz / 550G SSD/ 8G RAM). Perhaps better upgrade to LMDE 7 before I have installed to many apps. Any advice is welcome!
I would suggest a clean re-install of LMDE 7. 6 will be EOL in just a few months. :)
The permissions are binary, 3 sets of 3 bits. From binary 000 (decimal 0) to binary 111 (decimal 7).
As you said x = 001, write is 010 (dec 2) and read is 100 (dec 4).
To combine permissions you just add the values. In decimal it doesn't look like much but in binary is pretty obvious how works. Notice that the values all represent a power of 2.
To check the permission you can use a 'binary and'. For example 111 (7) and 010 (2) = 010 (2), which means you can write.
... If that makes sense... 🤔
Pedantic but accurate. Thanks. :)
I learned a ton from this video. It should be required viewing by anyone *nix no matter what color their beard is.
Sorry ladies. We love you too.
Would you mind doing a video for macOS? Or list the differences? Thanks!
I don't use it at all.
Go deeper and you will find the answers
'efivarfs' is the UEFI eeprom chip on the motherboard where the firmware and the initial boot settings are stored. It uses a FAT file system as I recall, but I don't recall the version fat12, fat16, fat32, Exfat32, etc
The EFI partition is Fat32 or Vfat. I've used both. :)
@EzeeLinux 'efivarfs' is not the EFI partition, it is not on your hard drive at all.
'efivarfs' holds the instructions to find your EFI partition and start the boot loader.
@mytech6779 Yes, I know... I was talking about the partition on the drive, adding to what you said..
Great video about the file structure, however… ext4, zfs and btrfs is a filesystem
The term is interchangeable for file structure and disk formats, as I pointed out in the vid.
Get this in book?
Got this in brain.
Highly advise you to make obsidian notes to really cement the mental model
Interested to know how you recommend mounting additional disks, for example one SATA disk for music files, one for videos, one for backups, one for syncing to other machines on a LAN using Syncthing (or other solution), etc. If they’re not temporarily mounted in /mnt, then where do they go?
The easiest way is to create a new directory in / and then change the permissions to 777 so everyone can access it. Mount your drive there and if it contains your Muisc, for instance, you can create a sym link to it from your /home directory. Add the mount to /etc/fstab so it will be permanent and you're done. :)
Sorry it is not meant for group or groups
jessy
Does a - bin - in a Linux Windows system, refer to the same thing as an - exe - file in a Microsoft windowing system?
No. Linux doesn't need any extensions to run a file. It just has to be marked executable. The 'bin' stands for binary code which is usually executable. :)
Happy to see youve escalated your ls beef w/DT with the addition of the -i flag
Always a little fun with those commands!
***can anyone give me a PROVEN linux shell command to resize PuTTY to make it smaller in order to see the cancel and open buttons at the bottom of the PuTTY window?
Sounds to me kike you may want to change the scaling on your screen in Windows.
Is it fair to say that everything can easily be looked at, or that everything is just a file? I know this is generally true, but when I think of things like gsettings which handles some back-end stuff for certain applications or desktops, that doesn’t really seem to fit the “everything is just a file” idea.
It's all contained in files so for the system it's true. One of the biggest criticisms of systemd is the fact that you can't see log file directly, though.
@EzeeLinuxThat makes sense, thanks!
Actually, you were right the first time. Those are colons, not semicolons.
Say both and you're right either way... Dyslexic reaction to such thing. :)
@EzeeLinuxThat's not exactly what I learned in grammar school.
":" - Colon
";" - Semicolon
🙂
Dude how the hell do you remember all this… I know how to code very very basic network stuff, but I’m not good with computers
It just takes time and practice, you'll get the hang of it! :)
@EzeeLinuxyeah I’m just trying to branch out… I think as person into tech you should have a understanding of everything or at least the basics. How would you go about remembering this stuff ? Just open folders and looking around ?
But what about expanding a linux drive?
What about it? What do you mean by 'expanding.'
@EzeeLinux As in adding more disk space to your virtual machine, and then taking that space into use in linux side. Seems complicated
@Leopardipzg That didn't make any sense to me. How and what are you adding to your vm?
@toby9999 more gigabytes to hard disk
For crying out loud! That's a _directory_ structure, not the ext[2,3,4] filesystem!
The term file system can refer to both.
@EzeeLinux "alternative facts" are not facts.
Oh, now I got it... when Republicans say they "own the LIBS" they are basically speaking in code:
$sudo rep chown /lib
🤣
It's actually surprisingly simple!
- Bin and sbin is for programs
- Boot has everything needed to start the system
- Dev has all your devices
- Etc, var, and usr mostly have stuff used by the system and programs
- Run has temporary files used by the system, tmp has temporary files for users
- Home has every user's personal files, root is the same except it's for root's files
Other directories such as media and cdrom are also pretty common, it's where media such as USB flash drives and CD-ROMs are mounted so you can access their files.
I bet you didn't even bother to watch the video, did you?
Was cruising through your other tutorials for installing linux mint including separating root and home folder and then you dropped this!
Really helpful guide for someone who's planning on transitioning out from windows all together. Thanks Joe!
/sys is an updated version of /proc. It is also virtual and shows the state of the running system.
Did I skip it?
Why they didn't change a and b to say flash storage I have no idea.
I assume your talking about Windows.
@EzeeLinux Yes.
They could have just mounted it in an empty directory.
You can make directory its own partition. I keep boot and boot efi it's own partition, this makes encryption a lot easier.
Yep. I covered that.
Dude you lost me back a Dolphin. So sorry you take the little things like body slam. After that, I lost inteerest.
It's just a little joke, dude. You're the one taking it like a body slam.
This is a great example of why MOST PEOPLE WILL NEVER USE LINUX. It's a PITA to do most common things on linux. Windows/macos you can takes 3 seconds to make one or two clicks(with everything explained) while with linux you HAVE TO study the os before you can do basically anything. Don't get me wrong, when set up correctly by a knowledgeable professional, linux is unbeatable. Unfortunately IT pros only account for ~1% of the population so 99% will are NOT ABLE TO or willing to learn what is necessary to use linux distros effectively.
Lots of people want to learn Linux. Sounds to me like you're not one of them.
Why are you venting frustration of your personal life on RUclips / SM ? Just because you are a lazy buffoon does not mean everyone is.
Within the first 2 mins he said that it is for the 'nerds' and not for average users.
This comment might have a kernel of truth if Linux was limited to servers and there weren't user-friendly desktop editions widely available. Linux Mint with Cinnamon, for example, is at least as easy to install as Windows or Macos. I am far from an IT professional. I came across LInux Mint about 12 years ago when I bought a used Dell machine from an IT professional who'd wiped the drive and put Linux Mint on it.
That was the start of positive journey. Learning the OS has been a wonderful part of the adventure. These days, my house is peppered with machines that run Linux in a multitude of distros and fucntions: several Raspberry Pis Zeros & 3s that do little tasks, 4 proxmox servers, 1 TrueNas, 1 Open Media Vault, various Docker devices. I'm tyrping this on a Chrombook.
I now find Windows to be the more infuriating and frustating to set up and use. Its UI is always getting in the way and it has a nasty habbit of turning on things that I don;t want even after I've opted out.
I might today be closer to the 1% imagined in the original comment, but I started in the 99%, I assure you.
I think that blanket statements like most people never will use Linux because of its unlying complexity is turn-of-the-century thinking that is no longer truely relevant even while sadly the undeserved reputatioin remains prevalent.
So, more power to Joe and this channel.
I watched Joes follow up video to this, and you're not accurate on your original statement.
"Linux" is the kernel. It's what ties your hardware to your interaction or interfaces with the hardware. Keyboard, mice, hard drives, video cards, sound cards, USB thingies, whatever. It's the "thing" that does the communication. Unless you write drivers, you don't "use" Linux. You "use" things like "Gnome" or "KDE", or packages put together and call them their own distribution like "Zorin" or "Linux Mint". Zorin and Mint are the User Interfaces someones built and put together off a few common, and long lived and even new to market, user interfaces. Mint is the interface. KDE is the interface. Gnome is the interface. Text Console with no GRAPHICS is the interface. This is not Linux, this is an interface.
Troubleshooting Linux can be just as troublesome as it is under Windows. Where the problems lie are between the two different systems are very different, and typically either described on what the problem is clear as day, or, just as cryptic to say that 0x34562346 is the problem. I've seen both kinds of errors be reported.
The trick to finding peace with using the Linux Kernel is going to boil down to how well the GUI (Anymore these days) is going to work with the user interacting with it. Linux isn't even EXT4 or EXT3 or ReiserFS or FAT32. The kernel knows how to talk to the device drivers that control your hard drive and those device drivers tell the kernel how to read or write content to the drive at the byte level. The kernel has NO CLUE that it's talking to a hard drive, or even what a hard drive IS for that matter.
@KeithWeston Mint is easy to instal, but that's where "easy" ended for me. Unlike Windows, which just works out of the box, Linux rarely does.
Joe, I'm missing desperately informations about the new File hierarchical standards, IE files from "/bin" being moved almost all to a new path under /usr/bin. So, what you actually can find on most modern linux systems in /bin is just legacy-links to the real binary file position, at least on all of my systems being located under /usr/bin
I think it would be important especially for new user to find the actual latest representation of file positions, so they don't have to learn old and outdated systems but be aware of the filesystem hierarchy transistioning (now for at least 10 or more years!). Even if transitions really do take their time until old pathes will be removed, at some time in future they will, and learning the right representations right from the start may help avoiding a lot of confusion.
Those links are never going away because too many scripts rely on them. It would break a lot of stuff. This is why it's important to learn why they are there. If we skip to now then a lot of the story is missing.
22:23 when you're going to explain a command and ask people to remember it you should actually say what it stands for... pwd = print working directory. ls = list...cd = change directory
I do that... Not every time but often enough, I think. A lot of this is obvious. :)