Recently moved to Linux as a daily driver. This is definitely one of the best guides to the file system I've seen. Even better than my college course! (although that's not saying much hahahaha)
I just recently started using linux for the first time, this def helped explain some of the stuff i was witnessing when learning commands in the terminal and stuff.
It's interesting if you look at the history of the unix filesystem layout. Originally there was just a few folders, but as the drives in the PDP11 ken thompson was using filled up, he made new directories as he added more drives. /usr was orinially for user files just like /home is now. /bin and /sbin were just /bin /media is a relative newcomer not actually from the unix days. The original layout was /bin /boot /sys /proc /dev /usr /var /tmp Everything else was added organically, either because KT added new drives, or because distro's thought it was a good idea
In discussing the opt folder you mentioned "if you have something that you have to install drivers for, besides nVidia drivers..." Why? What's different about nVidia drivers?
I'm not sure of the exact reason Nvidia Drivers don't go in opt, maybe its because Nvidia drivers are typically installed with the OS, and the opt folder typically has drivers you'd install long after the OS is up (printer drivers, wifi dongles, etc...)
Technically speaking, /opt is meant to be used for installing optional binaries, hence why it's called that. Back in a day, new programs would get installed there, but as linux/unix grew more complex, people stopped using /opt for everything, and started using /usr/bin for example, however, apparently it's still used by some things, like I'm sure toolchains are installed there, and as Kenny mentioned, proprietary drivers.
My understanding is that /opt is only accessible once userspace is up and running and is globally writeable. This would mean that the kernel distrusts any code placed there, so it cannot be loaded at boot. Nvidia drivers have to be loaded pretty early in the boot process (just after the filesystem) and so end up baked into the initramfs/initcpio, hence needing root permissions to install them
i grew up on Linux and it wasn't fun. I'm pretty normie when it comes to computers, although I am more advanced than the average Mac/Windows user. Being a normie, it's hard to use Linux much, and Linux doesn't support many of my games without requiring something like Wine or a Virtual Machine. It's still great to learn about other operating systems more in-depth so that even though I don't personally run Linux or Mac as my main machine, I'll still be able to understand problems that are occuring.
The way I can explain my thinking on your content is with a Death Grips music refrences Youe vids can be summarized as the three Death Grips tracks: Thru the wall, Lord of the game and I've seen footage. Because as much as I like these when you read into these and reflect on myself I feel genuinely more paranoid and self hatefull.
Its need to point to fact, that Linux have /bin /sbin /lib /usr due to historical reasons mostly. In ancient time space was scarce so they had to split system binaries into different physical devices and partitions. Now its heritage, yet consolidation is slowly taking place. Nowadays /bin, /sbin and /lib is symlinks to /usr subdirectories. and this is reason why /usr on separate partition is no longer allowed.
@@_thresh_ Yes, symlinks can go across partitions, but /bin (usually located on root partition) contains utilities which must be available even before /usr is mounted.
Thank you for this video, it was very interesting and I learned something. I'm trying running Fedora 36 as a daily OS, I mostly game and webbrowser stuff and so far it's going great :-)
Are you using an NTFS on your external drive? I did the same... I didn’t reformat my WD external drive to an adequate fs when I could and now I suffer everyday...
@@mfThump it can in fact be. The point is, NTFS is proprietary and is only supported (for R/W operations) via FUSE. The kernel-level support ends in Read-only mode and even if there was a support for write-mode it would still be far from perfect because it'd probably have the same restrictions on file names (which break wine and proton) as in windows. The problem is solved in ntfs-3g in which you can disable such restrictions (probably breaking windows' compatibility). But again, ntfs-3g in not kernel-level and, hence, pretty slow.
If I use Flatpaks, RPM, Snaps, or anything of this sort, where is this usually stored? Also, I would like to see a video on how safe these services are.
RPM uses the file system as described in the video. RPM and yum are like .deb and apt. If you mix the two you might have problems. The others i do not know, but if they're anything like docker, they hide away virtual copies of an entire file system in their own little enclave (/var/lib/flatpak) so they cant interfere with, or be broken by whatever changes in the actual file system.
To add to @JuddMan's comment. In the case of snaps, there are squashfs filesystem images stored in /var/lib/snapd that are mounted to /snap/ when loaded. Flatpaks work similarly in that they're stored in /var/lib/flatpak however i can't find much info on the file format, or where things get mounted. Just that "libraries get copied to /usr and a writeable directory is created in /var AppImages are a whole different beast, they're basically a script thats been concatenated with a tarball archive, a bit like the "installWizard" software from the good old windows days
Constructive Criticism. Why do you use the terminal when it would be better to use the visual elements of file folders, that are available right there in the file manager? All these tutorials from "experts" always assume too much of their viewers. The steam deck is coming up. How many new users of the steam deck are going to know anything about the terminal? Very few.
Its simpler, faster and consistent. Not everyone uses the same gui file manager, but the terminal is going to be the pretty much the same for everyone. The terminal commands in this video are pretty much as basic as they get, if you're interested in linux at all then I think it is worth learning how to use them. I would not expect the steam deck to ever require a user to use the terminal, or have any linux knowledge. I'm sure Valve will have nice gui tools for everything a user would need.
@@tsuki_4366 from what I've seen & heard about the steam deck, valve is being very open with their new OS, i would expect a terminal to at least be available (maybe in an "advanced" section) I'm very much looking forward to the software embargo being lifted
@@tsuki_4366 Pretty much all the major Gui's for Linux use the visual metaphor of file folders. When he talks about "files" in this video someone would have already know what he's talking about when he talks about root folders and the like. I can load up Both Cinnamon and KDE and point to the same file structure in their respective file managers. And it's not about learning or refusing to learn the terminal commands. It's about someone using already established points of reference to explain what's going on.
It’s for people who need to quickly move some files to a USB drive without farting around in the terminal. Some things should be mounted manually, and other things should be automatic.
I, personally, love the longer video format. However, I just want to point out that this isn't a guide for brand new Linux users; it's much more suited for a "kinda-new-but-know-a-little-bit" user. Tldr; great vid for newbies, not so great for n00bzs**z*zzz
I don't think /share is a thing. At least I've never seen that particular directory. Maybe it exists on some distro I've never used (which, TBF, is most of them). /usr/share does, of course, exist. Ones you didn't mention that may well exist are /usr/local/share and ~/.local/share
Actually Linux file structure is more or less logical. On Android its total mess, weird mix of Linux usual with android flavour and crapload of legacy symlinks
"flash drives appear in em en tee" Oh my god please just say 'mount' "you also see here etsy" For fucks sake it's 'et cetera' At least you got opt right smh
Recently moved to Linux as a daily driver.
This is definitely one of the best guides to the file system I've seen.
Even better than my college course! (although that's not saying much hahahaha)
I just recently started using linux for the first time, this def helped explain some of the stuff i was witnessing when learning commands in the terminal and stuff.
It's interesting if you look at the history of the unix filesystem layout.
Originally there was just a few folders, but as the drives in the PDP11 ken thompson was using filled up, he made new directories as he added more drives.
/usr was orinially for user files just like /home is now.
/bin and /sbin were just /bin
/media is a relative newcomer not actually from the unix days.
The original layout was
/bin
/boot
/sys
/proc
/dev
/usr
/var
/tmp
Everything else was added organically, either because KT added new drives, or because distro's thought it was a good idea
the evolution of /usr is fascinating
The /opt folder is not only for driver files or vendors. It is sometimes used for applications. Such as Discord
In discussing the opt folder you mentioned "if you have something that you have to install drivers for, besides nVidia drivers..." Why? What's different about nVidia drivers?
I'm not sure of the exact reason Nvidia Drivers don't go in opt, maybe its because Nvidia drivers are typically installed with the OS, and the opt folder typically has drivers you'd install long after the OS is up (printer drivers, wifi dongles, etc...)
so it's not a "proprietary" thing?
Technically speaking, /opt is meant to be used for installing optional binaries, hence why it's called that. Back in a day, new programs would get installed there, but as linux/unix grew more complex, people stopped using /opt for everything, and started using /usr/bin for example, however, apparently it's still used by some things, like I'm sure toolchains are installed there, and as Kenny mentioned, proprietary drivers.
My understanding is that /opt is only accessible once userspace is up and running and is globally writeable.
This would mean that the kernel distrusts any code placed there, so it cannot be loaded at boot.
Nvidia drivers have to be loaded pretty early in the boot process (just after the filesystem) and so end up baked into the initramfs/initcpio, hence needing root permissions to install them
I've seen at least 10 of these videos but I still wanted to see your explanation. It was worth it. Linux user for 10+ years.
Great video, I was having difficulty understanding the file structure as I have always used windows.
As a lifetime windows user, the hardest thing about switching to linux is learning the new file system. This makes it a bit easier thanks ha.
I'm starting to use Linux on daily basis, so very much thank you for the explanation.
the media folder is usually linked to `/run/media` or `/var/run/media`
Ohhh yeah baby. Been looking for this. Any suggestions out there on videos to watch for learning how to navigate basic linux functions?
I really want to recommend this channel to my friends however there are some inappropriate thumbnails n stuff preventing me from doing so
only true mental outlaws make it to this comment section
Yes
Indeed
Yep
Yeah
Thanks bro
A Noita player I see, respect
i grew up on Linux and it wasn't fun. I'm pretty normie when it comes to computers, although I am more advanced than the average Mac/Windows user. Being a normie, it's hard to use Linux much, and Linux doesn't support many of my games without requiring something like Wine or a Virtual Machine. It's still great to learn about other operating systems more in-depth so that even though I don't personally run Linux or Mac as my main machine, I'll still be able to understand problems that are occuring.
*many of my games don't support Linux
FTFY
The way I can explain my thinking on your content is with a Death Grips music refrences
Youe vids can be summarized as the three Death Grips tracks: Thru the wall, Lord of the game and I've seen footage.
Because as much as I like these when you read into these and reflect on myself I feel genuinely more paranoid and self hatefull.
Lol this Video has so little Views ?
Underrated af, thank u ❤️
Thanks for the video, very clearly spoken and easy to understand. I've subscribed to your channel thanks to this video.
Its need to point to fact, that Linux have /bin /sbin /lib /usr due to historical reasons mostly. In ancient time space was scarce so they had to split system binaries into different physical devices and partitions. Now its heritage, yet consolidation is slowly taking place.
Nowadays /bin, /sbin and /lib is symlinks to /usr subdirectories. and this is reason why /usr on separate partition is no longer allowed.
If I recall correctly symlinks can go across partitions, is it just in case the /usr partition gets unmounted or something?
@@_thresh_ Yes, symlinks can go across partitions, but /bin (usually located on root partition) contains utilities which must be available even before /usr is mounted.
Thank you for this video, it was very interesting and I learned something.
I'm trying running Fedora 36 as a daily OS, I mostly game and webbrowser stuff and so far it's going great :-)
Wow
underrated comment section
Excellent vid. Very helpful. Thank you for this.
You should put some lightusic in the backround to mask the audio turning on and off between sentences
Thanks for the vid, all is clear and brief
always wondered difference between mnt and media. 👍
Thank you so much for explaining this!
Are you using an NTFS on your external drive?
I did the same... I didn’t reformat my WD external drive to an adequate fs when I could and now I suffer everyday...
isnt it possible to access fat or ntfs? so would Ext just be less hassle..?
@@mfThump it can in fact be. The point is, NTFS is proprietary and is only supported (for R/W operations) via FUSE. The kernel-level support ends in Read-only mode and even if there was a support for write-mode it would still be far from perfect because it'd probably have the same restrictions on file names (which break wine and proton) as in windows.
The problem is solved in ntfs-3g in which you can disable such restrictions (probably breaking windows' compatibility). But again, ntfs-3g in not kernel-level and, hence, pretty slow.
I think 'usr' stands for 'unix system resources', at least that's what my professor told me
If I use Flatpaks, RPM, Snaps, or anything of this sort, where is this usually stored? Also, I would like to see a video on how safe these services are.
RPM uses the file system as described in the video. RPM and yum are like .deb and apt. If you mix the two you might have problems.
The others i do not know, but if they're anything like docker, they hide away virtual copies of an entire file system in their own little enclave (/var/lib/flatpak) so they cant interfere with, or be broken by whatever changes in the actual file system.
To add to @JuddMan's comment.
In the case of snaps, there are squashfs filesystem images stored in /var/lib/snapd that are mounted to /snap/ when loaded.
Flatpaks work similarly in that they're stored in /var/lib/flatpak however i can't find much info on the file format, or where things get mounted. Just that "libraries get copied to /usr and a writeable directory is created in /var
AppImages are a whole different beast, they're basically a script thats been concatenated with a tarball archive, a bit like the "installWizard" software from the good old windows days
I could be wrong, but I thought usr was for Unix System Resources. If anyone has an authoritative source saying otherwise, I'd really like to see it.
Constructive Criticism. Why do you use the terminal when it would be better to use the visual elements of file folders, that are available right there in the file manager? All these tutorials from "experts" always assume too much of their viewers. The steam deck is coming up. How many new users of the steam deck are going to know anything about the terminal? Very few.
Its simpler, faster and consistent. Not everyone uses the same gui file manager, but the terminal is going to be the pretty much the same for everyone. The terminal commands in this video are pretty much as basic as they get, if you're interested in linux at all then I think it is worth learning how to use them.
I would not expect the steam deck to ever require a user to use the terminal, or have any linux knowledge. I'm sure Valve will have nice gui tools for everything a user would need.
@@tsuki_4366 from what I've seen & heard about the steam deck, valve is being very open with their new OS, i would expect a terminal to at least be available (maybe in an "advanced" section)
I'm very much looking forward to the software embargo being lifted
@@tsuki_4366 Pretty much all the major Gui's for Linux use the visual metaphor of file folders. When he talks about "files" in this video someone would have already know what he's talking about when he talks about root folders and the like. I can load up Both Cinnamon and KDE and point to the same file structure in their respective file managers.
And it's not about learning or refusing to learn the terminal commands. It's about someone using already established points of reference to explain what's going on.
I don't know about you, but I don't have any 'libs' living in my computer.
That font is so small. It is difficult to see what you are typing.
clear and consise
very cool
*noita_backups*
BASADO
Wow nobody's here huh? Anyway yea cool video 👍
Automounting removable storage media is for cowards.
it is for people living in the 21st century.
@@PIKL_Creep aka cowards
It’s for people who need to quickly move some files to a USB drive without farting around in the terminal. Some things should be mounted manually, and other things should be automatic.
@@OcteractSG I know, I'm just shitposting, I still prefer to mount my phones storage on my PC using automated methods.
Thanks for this
usr actually stands for UNIX system resources
Noita!
bros got a folder for noita_backups
like its a rogue like for a reason 💀
I, personally, love the longer video format.
However, I just want to point out that this isn't a guide for brand new Linux users; it's much more suited for a "kinda-new-but-know-a-little-bit" user.
Tldr; great vid for newbies, not so great for n00bzs**z*zzz
i only watch you for your voice
What about share files
/share and /usr/share
I don't think /share is a thing. At least I've never seen that particular directory. Maybe it exists on some distro I've never used (which, TBF, is most of them). /usr/share does, of course, exist. Ones you didn't mention that may well exist are /usr/local/share and ~/.local/share
i have this on ubutu@@fllthdcrb
11285* :P
Directories > Folders
...can only be one.
Obi-Wan?
What happened here
Be more specific.
NOITA!
Cd eeze nutz
Actually Linux file structure is more or less logical. On Android its total mess, weird mix of Linux usual with android flavour and crapload of legacy symlinks
"flash drives appear in em en tee"
Oh my god please just say 'mount'
"you also see here etsy"
For fucks sake it's 'et cetera'
At least you got opt right smh
You need a 15 minutes video to understand how to open an folder??? Linux suxs
Literally cd /"folder name" wintard
you need the same for win, its just most win users dont understand folders
cry about it