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.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 104

  • @kurtmueller2089
    @kurtmueller2089 5 หลายเดือนก่อน +121

    "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 4 หลายเดือนก่อน

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

  • @alexpishvanov736
    @alexpishvanov736 5 หลายเดือนก่อน +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 5 หลายเดือนก่อน +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 4 หลายเดือนก่อน +14

    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 4 หลายเดือนก่อน +1

    This channel is everythin I needed!!! thank you

  • @FKing85
    @FKing85 5 หลายเดือนก่อน +1

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

  • @AlexCernat
    @AlexCernat 5 หลายเดือนก่อน +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 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 4 หลายเดือนก่อน

      ​@@vk3fbabneither did /mnt/

  • @marcellomenjivar
    @marcellomenjivar 4 หลายเดือนก่อน

    Amazing video! short simple and very digestible !

  • @OtterSwims
    @OtterSwims 4 หลายเดือนก่อน

    Well presented and pertinent, thanks for making it!

  • @luis96xd
    @luis96xd 4 หลายเดือนก่อน

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

  • @davidlu1003
    @davidlu1003 4 หลายเดือนก่อน

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

  • @laci272
    @laci272 4 หลายเดือนก่อน

    wow.. the best explanation so far

  • @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 4 หลายเดือนก่อน

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

  • @MushfiqMRahman
    @MushfiqMRahman 4 หลายเดือนก่อน

    Love your videos. Thank you.

  • @byteseq
    @byteseq 4 หลายเดือนก่อน +16

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

  • @Progaros
    @Progaros 5 หลายเดือนก่อน +4

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

  • @TotallyNotAuroras2ndChannel
    @TotallyNotAuroras2ndChannel 5 หลายเดือนก่อน +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 :)

  • @ylazerson
    @ylazerson 4 หลายเดือนก่อน

    great video - thanks!

  • @2009nn
    @2009nn 5 หลายเดือนก่อน +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 4 หลายเดือนก่อน

    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 4 หลายเดือนก่อน

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

  • @AbhishekShivkumar-ti6ru
    @AbhishekShivkumar-ti6ru 4 หลายเดือนก่อน

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

  • @JuanBeltrame4.2
    @JuanBeltrame4.2 4 หลายเดือนก่อน

    great! thsnks

  • @Shamstabrezkhan
    @Shamstabrezkhan 4 หลายเดือนก่อน +1

    Nice animation, how did you make this?

  • @numeroVLAD
    @numeroVLAD 4 หลายเดือนก่อน

    Very nice brief

  • @emnadgzel
    @emnadgzel 5 หลายเดือนก่อน

    thank you

  • @Crockerfeller
    @Crockerfeller 4 หลายเดือนก่อน +5

    No mention of /opt. 🤔

  • @edsonphilippe58
    @edsonphilippe58 5 หลายเดือนก่อน

    How do you make those animation? Great video

  • @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 4 หลายเดือนก่อน

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

  • @andyfusniak3397
    @andyfusniak3397 5 หลายเดือนก่อน +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 4 หลายเดือนก่อน +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 22 วันที่ผ่านมา

      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 4 หลายเดือนก่อน

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

  • @juliocryv
    @juliocryv 4 หลายเดือนก่อน

    Already subscribed

  • @MOOBBreezy
    @MOOBBreezy 4 หลายเดือนก่อน

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

  • @gamingraw1018
    @gamingraw1018 3 หลายเดือนก่อน

    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 ?

  • @dineshbalajia8817
    @dineshbalajia8817 5 หลายเดือนก่อน

    We need lot more details in linux on your style

  • @ColinRichardson
    @ColinRichardson 4 หลายเดือนก่อน

    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.

  • @dougmanatt4317
    @dougmanatt4317 4 หลายเดือนก่อน +2

    And what about /dev and /tmp ?

  • @fuseteam
    @fuseteam 5 หลายเดือนก่อน +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 4 หลายเดือนก่อน +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.

  • @wettmarley
    @wettmarley 2 หลายเดือนก่อน

    pls how do u make those videos ?

  • @chrisfedde4032
    @chrisfedde4032 4 หลายเดือนก่อน

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

  • @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?

  • @MD14493
    @MD14493 4 หลายเดือนก่อน

    The bottom up mouse triggers me. But great video!

  • @petar0402
    @petar0402 3 หลายเดือนก่อน

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

  • @thiagohenriquela
    @thiagohenriquela 3 หลายเดือนก่อน

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

  • @user-mc5lz1id5q
    @user-mc5lz1id5q 4 หลายเดือนก่อน

    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

  • @MrAkehtam
    @MrAkehtam 5 หลายเดือนก่อน +2

    I'll keep studying this till it sticks

  • @cigmorfil4101
    @cigmorfil4101 4 หลายเดือนก่อน

    "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 4 หลายเดือนก่อน

      exec cd
      checkmate atheists

    • @cigmorfil4101
      @cigmorfil4101 4 หลายเดือนก่อน

      @@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 4 หลายเดือนก่อน

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

  • @adrianmh
    @adrianmh 4 หลายเดือนก่อน

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

  • @abulaith4485
    @abulaith4485 4 หลายเดือนก่อน

    /opt ?

  • @haxpor
    @haxpor 4 หลายเดือนก่อน

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

  • @rastinsenobari6735
    @rastinsenobari6735 4 หลายเดือนก่อน

    where is /dev?

  • @saidbakr
    @saidbakr 4 หลายเดือนก่อน

    Where is SWAP? 🤔

  • @Namegoeshere-op9hg
    @Namegoeshere-op9hg 4 หลายเดือนก่อน

    /etc?

  • @j3r3miasmg
    @j3r3miasmg 5 หลายเดือนก่อน +5

    /dev

    • @Worldwidegam3r
      @Worldwidegam3r 5 หลายเดือนก่อน

      Would've thought to include one too.

  • @BandanazX
    @BandanazX 4 หลายเดือนก่อน

    1:30 trollololol

  • @gosnooky
    @gosnooky 3 หลายเดือนก่อน

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

  • @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 😁

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

  • @Boz1211111
    @Boz1211111 8 วันที่ผ่านมา

    Maybe good for machine but for humans this is so hard. Learning curve is too steep from windows

  • @fedepia84
    @fedepia84 4 หลายเดือนก่อน

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

  • @sinancetinkaya
    @sinancetinkaya 4 หลายเดือนก่อน

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

  • @KrishnanshAgarwal
    @KrishnanshAgarwal 5 หลายเดือนก่อน

    First comment

  • @astracodex7033
    @astracodex7033 5 หลายเดือนก่อน

    Second comment

  • @jora5483
    @jora5483 4 หลายเดือนก่อน

    Too complicated, too mysterious

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

  • @amosbennett3334
    @amosbennett3334 4 หลายเดือนก่อน

    The forced ad content was longer than this video.

  • @y_x2
    @y_x2 4 หลายเดือนก่อน

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

  • @kannan7709
    @kannan7709 4 หลายเดือนก่อน

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

  • @cherubin7th
    @cherubin7th 4 หลายเดือนก่อน +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.