Linux File System Explained!
Vložit
- čas přidán 16. 01. 2024
- Get a Free System Design PDF with 158 pages by subscribing to our weekly newsletter: bytebytego.ck.page/subscribe
Animation tools: Adobe Illustrator and After Effects.
Checkout our bestselling System Design Interview books:
Volume 1: amzn.to/3Ou7gkd
Volume 2: amzn.to/3HqGozy
The digital version of System Design Interview books: bit.ly/3mlDSk9
ABOUT US:
Covering topics and trends in large-scale system design, from the authors of the best-selling System Design Interview series. - Věda a technologie
"usr stands for unix system resources not user".
As someone who has been using Linux since SuSe 8.2 this is news to me.
Wow! Amazing video!
Indeed 😅
This is simply untrue. /usr is ancient UNIX lore and originally just meant the directory for users, which now is what /home is used for.
@@patrickocallaghan3429
No offence but You know this how ?
I'm not saying You are wrong, just that for things like this it is imo VERY hard to to find "definitive truth".
That is unless there is a documented source from the time "it happened", with a quote from and "authoritative source", that basically has the qualifications to "write the gospel" on the subject. Because if it's a quote from someone else then they can always have their own ""agenda"" or simply be mistaken. Even if it's from an "authoritative source" but it is "retold later" there is also a "non negligible" risk that they either want to "rewrite history", or just misremember.
In short I'm always very sceptic when people are having "disputes" regarding "things like this", hence my question.
Best regards.
Originally, the /usr directory was used to put home filesystems. This has obviously changed to /home. But, because /usr had home directories, the chance that the filesystem would be corrupt was higher than for the / directory. Also, back then, a filesystem check which changed the root partition required a reboot to recover. So, even if one could have a big / directory, chances would be good that there would be an error requiring a reboot, and a re-check of that filesystem. Having a small root which did not frequently change allowed for faster boot operations, as even if / was corrupted, the recheck would be fast. And, if in the worst case, where / was impossibly corrupted (especially if the fsck program was inaccessible), recovery from backup would be less likely to lose data, other than in /etc, such as recent password changes. Finally, if the hard drive crashed (a frequent occurrence in the days of removable media), the entire root partition could be replaced, while the /usr could be recovered through incremental backups.
cute backronym. I'm sure dmr & kt would giggle.
To memories! Most clear, brief and comprehensive explanation ever!
Thank you for breaking down complex concepts in such a clear and understandable way
fun trivia users' home directory used to live in /usr before being moved to /home
So /usr actually stands for 'user', 'unix system resources' is a bacronym to point out that userdata no longer lives in /usr
That's genious way of repurposing a thing
and I learned a new word, *"bacronym,"* so thank you for that too!
THAT WAS ONE OF THE MOST ACCESSIBLE BREAKDOWNS of the LINUX FILE/FOLDER STRICTURE EVER!! i knew most of it, but this was a good refresher
Nice, but besides not mentioning /dev, you also forgot to mention new trend on almost all linux distributions: all exec in /usr (so /bin, /sbin, also /lib "merged" in /usr/* directories).
Whatcha mean?
@@kevinburke2446 in short, bin directories are mostly merged now in modern distro, perhaps to prevent confusion among developers. For /dev directory, it's dedicated for raw access to the hardware, like representing a hard drive as a file (/dev/sda) for partitioning, recovery, and advanced stuffs
/dev and /tmp plus /boot all fairly standard on most UNIX oses didn't make the cut.
@@vk3fbabneither did /mnt/
This channel is everythin I needed!!! thank you
You are amazing! Thank you for everything you've done!
Amazing video! short simple and very digestible !
Well presented and pertinent, thanks for making it!
As a Linux newbie for years :) understand its file system is still a challenge for me. 😢
I've have rewinded this vid a number of times already :) (which file types go into which folder)
A pdf would be nice. Thanks. PS. Comments by experts below are also helpful. 👍
Been followed & subscribed.
+1 on this comment, was here to type that out, but I see I'm not alone here.
/mnt is also quite common (e.g. for drives & disks)
Amazing video, everything was well explained, thanks!
I thought/usr meant user, thanks for clarifying 💯
The video about the Linux structure is great. It is very clear, thank you.😁😁😁
wow.. the best explanation so far
Love your videos. Thank you.
Always very nice. My grad school prof couldn't describe it like you.
:) show him/her this vid, then maybe you'll get an A :)
Perfect explanation for anyone working with UNIX! Thanks for these amazing videos.
I see that there are very nice animations and content. Could you please provide info about what tools are used to create these wonderful animations? Thank you.
This is not a video about the "File System", this is just a video about Linux' directory structure.
Big true was mildly disappointed
Can you do a video on the difference between multitasking and multithreading or even multiprogramming?
Thanks for this wonderful video! If you don't mind sharing, what type of application/tool do you use for your vlogs? It's really great!
it's his secret sauce :)
great video - thanks!
Pleased what software or platform do you use to make those animated slides on this video? It is very nice while learning as a beginner. Can someone help ?
How do you make those animation? Great video
thank you
Nice animation, how did you make this?
great! thsnks
I love these videos. By the way 1:16 cd is a shell builtin, not a binary (at least I've never seen one).
'cd' *has* to be a Shell built-in. It's not possible for it to be a binary executable because it changes the context of the calling Shell.
I see.
@@patrickocallaghan3429 You're quite right. Thinking about it, a cd binary would have to be invoked (an exec system call) forking a child process of the shell. The child process cannot modify the working directory of its parent process (the shell).
Strange, but true: RedHat has a /usr/bin/cd!
For sure, a /usr/bin/cd /tmp will not change your shell's current working directory to /tmp.
Great video, but to complete the picture we need to mention /dev as well...
Can I ask what you are using for the animations.. your animations are exactly what I have in my mind for my channel but haven't figured out to create yet.. awesome stuff regardless.
@@ikdfeniix3931 CZcams legit recommend me a video last night on it lol. Silly algorithm reading my comments..
No mention of /opt. 🤔
Very nice brief
4:52 is that a booboo or is "uss" a new folder you didn't talk about?
I am assuming it's a booboo, since it looks like "usr", but I just wanted it clarified.
We need lot more details in linux on your style
Great video, but why did you skip a few directories?
pls how do u make those videos ?
And what about /dev and /tmp ?
Already subscribed
hi, I need help. I would like How do It graphic explain on vídeo?
What about /dev, /tmp, /opt and /mnt?
The bottom up mouse triggers me. But great video!
Fun fact: on modern linux distros /usr/bin and /bin are merged
Same for /usr/lib and /lib
Unless the are still split into lib and lib64. Bistros can have any combination of one to four dirs
@@llothar68 i haven't seen /lib64, this is usually brought inside of /lib
Good point. Video didn't cover that important aspect. The reason that the locations are "merged" is to maintain compatibility with the FHS standard discussed in the video. Simply put, having the ability to "merge" directories allows maintainers the flexibility to improve the distro without breaking the standard; providing support for backwards compatibility, or binary level compatibility across different distros.
`man hier` has been a part of unix and linux for decades.
And now explain it with packaging environment again. How does a snap or a flatpak sees the filesystem. How an Android linux?
"cd" is a shell built-in: how else would the directory get changed?
If it was a separate program it would change the directory of the process it was in and then exit - nothing would change in the parent (shell) process.
exec cd
checkmate atheists
@@XxZeldaxXXxLinkxX
Shirley in that case you would get something like:
$ exec cd /tmp
Machine name
login:
As your shell gets replaced by cd which then exits and so the original parent (getty) gets its child has exited and so spawns another login on that tty.
Or if you're using a terminal [emulator] in a gui the window closes after you hit return as the shell gets replaced by cd which then exits.
@@XxZeldaxXXxLinkxX
And what happens when you do that?
$ exec cd /tmp
Mymachine
Login :
Oops the shell was replaced by the cd command which then exited and so the parent process, getty, noticed its child had finished, so spawned another login.
Or, if using a terminal [emulator, eg xterm] in a gui:
$ exec cd
as the shell has been replaced by the cd program which exits and so the program for which the window exists is no longer there, so the window is closed...
Can you make a tutorial about your animation. I love your animation style. I wanna make the same animation. Could you teach me. Does anyone know how to make this kind of animation ?
4:52 has typo "uss" for usr
Totally great visual!
Fun fact (not to nitpick, I also found it not necessary): Qt pronounces as "cute".
/opt ?
I was today years old when i learned usr = unix system resources
where is /dev?
/etc?
/dev
Would've thought to include one too.
I'll keep studying this till it sticks
Where is SWAP? 🤔
"Everything in Linux is a file"... but I prefer to think of it as "Everything in Linux is a file descriptor".
*/usr* should be renamed to */unu.*
*unu:* _unu is not usr._
Well it did get accidentally renamed "uss" at 4:50 😁
1:30 trollololol
So I'm still not hearing how these will be better than an NVIDIA card with tensor cores. Lower price point maybe, but you get what you pay for.
the title is a bit misleading
I expected this video to explain how the ext file system worked instead
so much mess in the early ages 🤣. What about OSX structure?
First comment
This is one thing Windows does better than Linux. This hierarchy is overly complicated, mostly for no reason.
Nah. C:\Program files, C:\Program files (x86), ProgramData, C:\User\User\AppData\Local, C:\User\User\AppData\Roaming - guess where your software lives, guess where your config file is among those directories. It's whack-a-mole.
the title should've been "Linux Directory Structure", not "Linux File System" !
Too complicated, too mysterious
Second comment
The forced ad content was longer than this video.
Too many sub-directory with the same name!!!
Your course will never reach
.. Your voice😂... Your explanation😂... 🤬🤬🤬🤬😤😤😤😤
They should remove most of them and instead have all resources of an app inside a single directory and not spread across the system.