Linux File System Explained!

Поділитися
Вставка
  • Опубліковано 16 січ 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.
  • Наука та технологія

КОМЕНТАРІ • 102

  • @kurtmueller2089
    @kurtmueller2089 4 місяці тому +115

    "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 4 місяці тому +3

      Indeed 😅

    • @patrickocallaghan3429
      @patrickocallaghan3429 4 місяці тому +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 4 місяці тому +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 4 місяці тому +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 3 місяці тому

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

  • @alexpishvanov736
    @alexpishvanov736 4 місяці тому +24

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

  • @engrSakir
    @engrSakir 4 місяці тому +5

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

  • @fuseteam
    @fuseteam 4 місяці тому +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 4 місяці тому +3

      That's genious way of repurposing a thing

    • @jefffuhr2393
      @jefffuhr2393 4 місяці тому +5

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

  • @baumstamp5989
    @baumstamp5989 3 місяці тому +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

  • @Mugruokgt
    @Mugruokgt 3 місяці тому +1

    This channel is everythin I needed!!! thank you

  • @FKing85
    @FKing85 4 місяці тому +1

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

  • @OtterSwims
    @OtterSwims 4 місяці тому

    Well presented and pertinent, thanks for making it!

  • @txreal2
    @txreal2 4 місяці тому +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 3 місяці тому

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

  • @AlexCernat
    @AlexCernat 4 місяці тому +81

    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 4 місяці тому

      Whatcha mean?

    • @KangJangkrik
      @KangJangkrik 4 місяці тому +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 4 місяці тому +9

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

    • @koloblicin4599
      @koloblicin4599 3 місяці тому

      ​@@vk3fbabneither did /mnt/

  • @luis96xd
    @luis96xd 4 місяці тому

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

  • @marcellomenjivar
    @marcellomenjivar 4 місяці тому

    Amazing video! short simple and very digestible !

  • @davidlu1003
    @davidlu1003 3 місяці тому

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

  • @laci272
    @laci272 4 місяці тому

    wow.. the best explanation so far

  • @TotallyNotAuroras2ndChannel
    @TotallyNotAuroras2ndChannel 4 місяці тому +1

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

    • @txreal2
      @txreal2 4 місяці тому +1

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

  • @AbhishekShivkumar-ti6ru
    @AbhishekShivkumar-ti6ru 4 місяці тому

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

  • @Progaros
    @Progaros 4 місяці тому +4

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

  • @byteseq
    @byteseq 4 місяці тому +15

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

  • @MushfiqMRahman
    @MushfiqMRahman 3 місяці тому

    Love your videos. Thank you.

  • @2009nn
    @2009nn 4 місяці тому +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 4 місяці тому

      it's his secret sauce :)

  • @vasylpavuk391
    @vasylpavuk391 3 місяці тому

    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.

  • @alizaaliza253
    @alizaaliza253 3 місяці тому

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

  • @Crockerfeller
    @Crockerfeller 4 місяці тому +5

    No mention of /opt. 🤔

  • @Shamstabrezkhan
    @Shamstabrezkhan 4 місяці тому +1

    Nice animation, how did you make this?

  • @edsonphilippe58
    @edsonphilippe58 4 місяці тому

    How do you make those animation? Great video

  • @dineshbalajia8817
    @dineshbalajia8817 4 місяці тому

    We need lot more details in linux on your style

  • @fordayinlife
    @fordayinlife 4 місяці тому

    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 3 місяці тому

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

  • @anicka1354
    @anicka1354 3 місяці тому

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

  • @ylazerson
    @ylazerson 3 місяці тому

    great video - thanks!

  • @andyfusniak3397
    @andyfusniak3397 4 місяці тому +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 4 місяці тому +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 4 місяці тому

      I see.

    • @andyfusniak3397
      @andyfusniak3397 3 місяці тому +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).

  • @emnadgzel
    @emnadgzel 4 місяці тому

    thank you

  • @MOOBBreezy
    @MOOBBreezy 3 місяці тому

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

  • @juliocryv
    @juliocryv 3 місяці тому

    Already subscribed

  • @numeroVLAD
    @numeroVLAD 3 місяці тому

    Very nice brief

  • @gamingraw1018
    @gamingraw1018 2 місяці тому

    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 ?

  • @JuanBeltrame4.2
    @JuanBeltrame4.2 3 місяці тому

    great! thsnks

  • @ColinRichardson
    @ColinRichardson 3 місяці тому

    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.

  • @fuseteam
    @fuseteam 4 місяці тому +1

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

    • @llothar68
      @llothar68 4 місяці тому

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

    • @fuseteam
      @fuseteam 4 місяці тому

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

    • @joross8
      @joross8 3 місяці тому +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.

  • @dougmanatt4317
    @dougmanatt4317 4 місяці тому +2

    And what about /dev and /tmp ?

  • @chrisfedde4032
    @chrisfedde4032 3 місяці тому

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

  • @MD14493
    @MD14493 3 місяці тому

    The bottom up mouse triggers me. But great video!

  • @llothar68
    @llothar68 4 місяці тому +1

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

  • @wettmarley
    @wettmarley 2 місяці тому

    pls how do u make those videos ?

  • @cigmorfil4101
    @cigmorfil4101 3 місяці тому

    "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 3 місяці тому

      exec cd
      checkmate atheists

    • @cigmorfil4101
      @cigmorfil4101 3 місяці тому

      @@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 3 місяці тому

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

  • @gosnooky
    @gosnooky 2 місяці тому

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

  • @haxpor
    @haxpor 4 місяці тому

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

  • @user-mc5lz1id5q
    @user-mc5lz1id5q 3 місяці тому

    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 4 місяці тому

    4:52 has typo "uss" for usr

  • @thiagohenriquela
    @thiagohenriquela 2 місяці тому

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

  • @petar0402
    @petar0402 2 місяці тому

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

  • @MrAkehtam
    @MrAkehtam 4 місяці тому +2

    I'll keep studying this till it sticks

  • @adrianmh
    @adrianmh 4 місяці тому

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

  • @DemPilafian
    @DemPilafian 4 місяці тому +1

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

    • @NonTwinBrothers
      @NonTwinBrothers 4 місяці тому +2

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

  • @saidbakr
    @saidbakr 4 місяці тому

    Where is SWAP? 🤔

  • @rastinsenobari6735
    @rastinsenobari6735 3 місяці тому

    where is /dev?

  • @j3r3miasmg
    @j3r3miasmg 4 місяці тому +5

    /dev

    • @Worldwidegam3r
      @Worldwidegam3r 4 місяці тому

      Would've thought to include one too.

  • @abulaith4485
    @abulaith4485 4 місяці тому

    /opt ?

  • @Namegoeshere-op9hg
    @Namegoeshere-op9hg 3 місяці тому

    /etc?

  • @sergiocoder
    @sergiocoder 4 місяці тому

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

  • @etherweb6796
    @etherweb6796 4 місяці тому

    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.

  • @BandanazX
    @BandanazX 4 місяці тому

    1:30 trollololol

  • @sinancetinkaya
    @sinancetinkaya 3 місяці тому

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

  • @fedepia84
    @fedepia84 3 місяці тому

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

  • @KrishnanshAgarwal
    @KrishnanshAgarwal 4 місяці тому

    First comment

  • @amosbennett3334
    @amosbennett3334 4 місяці тому

    The forced ad content was longer than this video.

  • @evancombs5159
    @evancombs5159 4 місяці тому

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

    • @RedSaint83
      @RedSaint83 4 місяці тому +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.

  • @jora5483
    @jora5483 3 місяці тому

    Too complicated, too mysterious

  • @astracodex7033
    @astracodex7033 4 місяці тому

    Second comment

  • @y_x2
    @y_x2 3 місяці тому

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

  • @kannan7709
    @kannan7709 4 місяці тому

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

  • @cherubin7th
    @cherubin7th 3 місяці тому +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.