Linux File System Explained!

Sdílet
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

Komentáře • 103

  • @kurtmueller2089
    @kurtmueller2089 Před 4 měsíci +117

    "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!

    • @fabriziot1467
      @fabriziot1467 Před 4 měsíci +3

      Indeed 😅

    • @patrickocallaghan3429
      @patrickocallaghan3429 Před 4 měsíci +7

      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.

    • @onlyeyeno
      @onlyeyeno Před 4 měsíci +2

      @@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.

    • @laksflaks
      @laksflaks Před 4 měsíci +1

      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.

    • @wlewisiii
      @wlewisiii Před 3 měsíci

      cute backronym. I'm sure dmr & kt would giggle.

  • @alexpishvanov736
    @alexpishvanov736 Před 4 měsíci +24

    To memories! Most clear, brief and comprehensive explanation ever!

  • @engrSakir
    @engrSakir Před 4 měsíci +5

    Thank you for breaking down complex concepts in such a clear and understandable way

  • @fuseteam
    @fuseteam Před 4 měsíci +29

    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

    • @KangJangkrik
      @KangJangkrik Před 4 měsíci +3

      That's genious way of repurposing a thing

    • @jefffuhr2393
      @jefffuhr2393 Před 4 měsíci +5

      and I learned a new word, *"bacronym,"* so thank you for that too!

  • @baumstamp5989
    @baumstamp5989 Před 4 měsíci +13

    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

  • @AlexCernat
    @AlexCernat Před 4 měsíci +84

    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).

    • @kevinburke2446
      @kevinburke2446 Před 4 měsíci

      Whatcha mean?

    • @KangJangkrik
      @KangJangkrik Před 4 měsíci +15

      ​@@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

    • @vk3fbab
      @vk3fbab Před 4 měsíci +9

      /dev and /tmp plus /boot all fairly standard on most UNIX oses didn't make the cut.

    • @koloblicin4599
      @koloblicin4599 Před 4 měsíci

      ​@@vk3fbabneither did /mnt/

  • @Mugruokgt
    @Mugruokgt Před 4 měsíci +1

    This channel is everythin I needed!!! thank you

  • @FKing85
    @FKing85 Před 4 měsíci +1

    You are amazing! Thank you for everything you've done!

  • @marcellomenjivar
    @marcellomenjivar Před 4 měsíci

    Amazing video! short simple and very digestible !

  • @OtterSwims
    @OtterSwims Před 4 měsíci

    Well presented and pertinent, thanks for making it!

  • @txreal2
    @txreal2 Před 4 měsíci +8

    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.

    • @nicklaspillay7923
      @nicklaspillay7923 Před 4 měsíci

      +1 on this comment, was here to type that out, but I see I'm not alone here.

  • @Progaros
    @Progaros Před 4 měsíci +4

    /mnt is also quite common (e.g. for drives & disks)

  • @luis96xd
    @luis96xd Před 4 měsíci

    Amazing video, everything was well explained, thanks!
    I thought/usr meant user, thanks for clarifying 💯

  • @davidlu1003
    @davidlu1003 Před 4 měsíci

    The video about the Linux structure is great. It is very clear, thank you.😁😁😁

  • @laci272
    @laci272 Před 4 měsíci

    wow.. the best explanation so far

  • @MushfiqMRahman
    @MushfiqMRahman Před 4 měsíci

    Love your videos. Thank you.

  • @TotallyNotAuroras2ndChannel
    @TotallyNotAuroras2ndChannel Před 4 měsíci +1

    Always very nice. My grad school prof couldn't describe it like you.

    • @txreal2
      @txreal2 Před 4 měsíci +1

      :) show him/her this vid, then maybe you'll get an A :)

  • @AbhishekShivkumar-ti6ru
    @AbhishekShivkumar-ti6ru Před 4 měsíci

    Perfect explanation for anyone working with UNIX! Thanks for these amazing videos.

  • @vasylpavuk391
    @vasylpavuk391 Před 4 měsíci

    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.

  • @byteseq
    @byteseq Před 4 měsíci +16

    This is not a video about the "File System", this is just a video about Linux' directory structure.

  • @alizaaliza253
    @alizaaliza253 Před 4 měsíci

    Can you do a video on the difference between multitasking and multithreading or even multiprogramming?

  • @2009nn
    @2009nn Před 4 měsíci +2

    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!

    • @txreal2
      @txreal2 Před 4 měsíci

      it's his secret sauce :)

  • @ylazerson
    @ylazerson Před 4 měsíci

    great video - thanks!

  • @gamingraw1018
    @gamingraw1018 Před 3 měsíci

    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 ?

  • @edsonphilippe58
    @edsonphilippe58 Před 4 měsíci

    How do you make those animation? Great video

  • @emnadgzel
    @emnadgzel Před 4 měsíci

    thank you

  • @Shamstabrezkhan
    @Shamstabrezkhan Před 4 měsíci +1

    Nice animation, how did you make this?

  • @JuanBeltrame4.2
    @JuanBeltrame4.2 Před 3 měsíci

    great! thsnks

  • @andyfusniak3397
    @andyfusniak3397 Před 4 měsíci +13

    I love these videos. By the way 1:16 cd is a shell builtin, not a binary (at least I've never seen one).

    • @patrickocallaghan3429
      @patrickocallaghan3429 Před 4 měsíci +1

      '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.

    • @LaeeqKhan01
      @LaeeqKhan01 Před 4 měsíci

      I see.

    • @andyfusniak3397
      @andyfusniak3397 Před 3 měsíci +1

      @@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).

    • @martinschulte3613
      @martinschulte3613 Před 11 dny

      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.

  • @anicka1354
    @anicka1354 Před 4 měsíci

    Great video, but to complete the picture we need to mention /dev as well...

  • @fordayinlife
    @fordayinlife Před 4 měsíci

    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.

    • @fordayinlife
      @fordayinlife Před 4 měsíci

      @@ikdfeniix3931 CZcams legit recommend me a video last night on it lol. Silly algorithm reading my comments..

  • @Crockerfeller
    @Crockerfeller Před 4 měsíci +5

    No mention of /opt. 🤔

  • @numeroVLAD
    @numeroVLAD Před 4 měsíci

    Very nice brief

  • @ColinRichardson
    @ColinRichardson Před 4 měsíci

    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.

  • @dineshbalajia8817
    @dineshbalajia8817 Před 4 měsíci

    We need lot more details in linux on your style

  • @MOOBBreezy
    @MOOBBreezy Před 3 měsíci

    Great video, but why did you skip a few directories?

  • @wettmarley
    @wettmarley Před 2 měsíci

    pls how do u make those videos ?

  • @dougmanatt4317
    @dougmanatt4317 Před 4 měsíci +2

    And what about /dev and /tmp ?

  • @juliocryv
    @juliocryv Před 4 měsíci

    Already subscribed

  • @thiagohenriquela
    @thiagohenriquela Před 3 měsíci

    hi, I need help. I would like How do It graphic explain on vídeo?

  • @petar0402
    @petar0402 Před 3 měsíci

    What about /dev, /tmp, /opt and /mnt?

  • @MD14493
    @MD14493 Před 4 měsíci

    The bottom up mouse triggers me. But great video!

  • @fuseteam
    @fuseteam Před 4 měsíci +1

    Fun fact: on modern linux distros /usr/bin and /bin are merged
    Same for /usr/lib and /lib

    • @llothar68
      @llothar68 Před 4 měsíci

      Unless the are still split into lib and lib64. Bistros can have any combination of one to four dirs

    • @fuseteam
      @fuseteam Před 4 měsíci

      @@llothar68 i haven't seen /lib64, this is usually brought inside of /lib

    • @joross8
      @joross8 Před 4 měsíci +1

      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.

  • @chrisfedde4032
    @chrisfedde4032 Před 4 měsíci

    `man hier` has been a part of unix and linux for decades.

  • @llothar68
    @llothar68 Před 4 měsíci +1

    And now explain it with packaging environment again. How does a snap or a flatpak sees the filesystem. How an Android linux?

  • @cigmorfil4101
    @cigmorfil4101 Před 4 měsíci

    "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.

    • @XxZeldaxXXxLinkxX
      @XxZeldaxXXxLinkxX Před 3 měsíci

      exec cd
      checkmate atheists

    • @cigmorfil4101
      @cigmorfil4101 Před 3 měsíci

      @@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.

    • @cigmorfil4101
      @cigmorfil4101 Před 3 měsíci

      @@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...

  • @user-mc5lz1id5q
    @user-mc5lz1id5q Před 4 měsíci

    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 ?

  • @albertoesquivias6073
    @albertoesquivias6073 Před 4 měsíci

    4:52 has typo "uss" for usr

  • @haxpor
    @haxpor Před 4 měsíci

    Totally great visual!
    Fun fact (not to nitpick, I also found it not necessary): Qt pronounces as "cute".

  • @abulaith4485
    @abulaith4485 Před 4 měsíci

    /opt ?

  • @adrianmh
    @adrianmh Před 4 měsíci

    I was today years old when i learned usr = unix system resources

  • @rastinsenobari6735
    @rastinsenobari6735 Před 4 měsíci

    where is /dev?

  • @Namegoeshere-op9hg
    @Namegoeshere-op9hg Před 4 měsíci

    /etc?

  • @j3r3miasmg
    @j3r3miasmg Před 4 měsíci +5

    /dev

  • @MrAkehtam
    @MrAkehtam Před 4 měsíci +2

    I'll keep studying this till it sticks

  • @saidbakr
    @saidbakr Před 4 měsíci

    Where is SWAP? 🤔

  • @gosnooky
    @gosnooky Před 3 měsíci

    "Everything in Linux is a file"... but I prefer to think of it as "Everything in Linux is a file descriptor".

  • @DemPilafian
    @DemPilafian Před 4 měsíci +1

    */usr* should be renamed to */unu.*
    *unu:* _unu is not usr._

    • @NonTwinBrothers
      @NonTwinBrothers Před 4 měsíci +2

      Well it did get accidentally renamed "uss" at 4:50 😁

  • @BandanazX
    @BandanazX Před 4 měsíci

    1:30 trollololol

  • @etherweb6796
    @etherweb6796 Před 4 měsíci

    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.

  • @sergiocoder
    @sergiocoder Před 4 měsíci

    the title is a bit misleading
    I expected this video to explain how the ext file system worked instead

  • @fedepia84
    @fedepia84 Před 4 měsíci

    so much mess in the early ages 🤣. What about OSX structure?

  • @KrishnanshAgarwal
    @KrishnanshAgarwal Před 4 měsíci

    First comment

  • @evancombs5159
    @evancombs5159 Před 4 měsíci

    This is one thing Windows does better than Linux. This hierarchy is overly complicated, mostly for no reason.

    • @RedSaint83
      @RedSaint83 Před 4 měsíci +1

      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.

  • @sinancetinkaya
    @sinancetinkaya Před 4 měsíci

    the title should've been "Linux Directory Structure", not "Linux File System" !

  • @jora5483
    @jora5483 Před 4 měsíci

    Too complicated, too mysterious

  • @astracodex7033
    @astracodex7033 Před 4 měsíci

    Second comment

  • @amosbennett3334
    @amosbennett3334 Před 4 měsíci

    The forced ad content was longer than this video.

  • @y_x2
    @y_x2 Před 3 měsíci

    Too many sub-directory with the same name!!!

  • @kannan7709
    @kannan7709 Před 4 měsíci

    Your course will never reach
    .. Your voice😂... Your explanation😂... 🤬🤬🤬🤬😤😤😤😤

  • @cherubin7th
    @cherubin7th Před 3 měsíci +1

    They should remove most of them and instead have all resources of an app inside a single directory and not spread across the system.