The Linux File Structure Explained

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 89

  • @Zer0sVoid
    @Zer0sVoid 2 года назад +86

    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)

  • @vens1337
    @vens1337 3 года назад +64

    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.

  • @Person1873
    @Person1873 2 года назад +22

    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

    • @ferro9929
      @ferro9929 Год назад +1

      the evolution of /usr is fascinating

  • @SearInMinecraft
    @SearInMinecraft 2 года назад +10

    The /opt folder is not only for driver files or vendors. It is sometimes used for applications. Such as Discord

  • @arcticjoe1142
    @arcticjoe1142 4 года назад +71

    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?

    • @MentalOutlaw
      @MentalOutlaw  4 года назад +70

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

    • @premier69
      @premier69 4 года назад +12

      so it's not a "proprietary" thing?

    • @hikkamorii
      @hikkamorii 2 года назад +16

      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.

    • @Person1873
      @Person1873 2 года назад +5

      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

  • @BenLJackson
    @BenLJackson 2 года назад +1

    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.

  • @tushgaurav
    @tushgaurav 3 года назад +17

    Great video, I was having difficulty understanding the file structure as I have always used windows.

  • @Zombytes
    @Zombytes Год назад

    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.

  • @irwainnornossa4605
    @irwainnornossa4605 2 года назад +1

    I'm starting to use Linux on daily basis, so very much thank you for the explanation.

  • @DaBoomDude
    @DaBoomDude 2 года назад +3

    the media folder is usually linked to `/run/media` or `/var/run/media`

  • @snak8y8s
    @snak8y8s Год назад

    Ohhh yeah baby. Been looking for this. Any suggestions out there on videos to watch for learning how to navigate basic linux functions?

  • @Cube_Box
    @Cube_Box 2 года назад

    I really want to recommend this channel to my friends however there are some inappropriate thumbnails n stuff preventing me from doing so

  • @FourOf92000
    @FourOf92000 3 года назад +59

    only true mental outlaws make it to this comment section

  • @shrimp_on_internet
    @shrimp_on_internet 3 года назад +16

    Thanks bro

  • @keksmember
    @keksmember 2 года назад +4

    A Noita player I see, respect

  • @citrufruit
    @citrufruit 2 года назад +4

    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.

    • @Person1873
      @Person1873 2 года назад +2

      *many of my games don't support Linux
      FTFY

  • @masterzoroark6664
    @masterzoroark6664 2 года назад

    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.

  • @Minecraftpecake
    @Minecraftpecake 3 года назад +1

    Lol this Video has so little Views ?
    Underrated af, thank u ❤️

  • @BastionOfChaos
    @BastionOfChaos 3 года назад

    Thanks for the video, very clearly spoken and easy to understand. I've subscribed to your channel thanks to this video.

  • @Vednier
    @Vednier Год назад +1

    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_
      @_thresh_ 6 месяцев назад

      If I recall correctly symlinks can go across partitions, is it just in case the /usr partition gets unmounted or something?

    • @Vednier
      @Vednier 6 месяцев назад

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

  • @sadjesse
    @sadjesse 2 года назад

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

  • @ultrahalf
    @ultrahalf 3 года назад +8

    Wow
    underrated comment section

  • @alecjordan6100
    @alecjordan6100 2 года назад

    Excellent vid. Very helpful. Thank you for this.

  • @Taylor_5724
    @Taylor_5724 2 года назад

    You should put some lightusic in the backround to mask the audio turning on and off between sentences

  • @melnikovjnr
    @melnikovjnr 2 года назад

    Thanks for the vid, all is clear and brief

  • @CU.SpaceCowboy
    @CU.SpaceCowboy Год назад

    always wondered difference between mnt and media. 👍

  • @moisejl1
    @moisejl1 2 года назад

    Thank you so much for explaining this!

  • @SLayeR-ud9ji
    @SLayeR-ud9ji 3 года назад +3

    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
      @mfThump 2 года назад

      isnt it possible to access fat or ntfs? so would Ext just be less hassle..?

    • @SLayeR-ud9ji
      @SLayeR-ud9ji 2 года назад +2

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

  • @Brodzik-kz8nt
    @Brodzik-kz8nt 2 года назад +1

    I think 'usr' stands for 'unix system resources', at least that's what my professor told me

  • @BasedPureblood
    @BasedPureblood 2 года назад +2

    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.

    • @JuddMan03
      @JuddMan03 2 года назад +3

      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.

    • @Person1873
      @Person1873 2 года назад +1

      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

  • @justinandrewhampton
    @justinandrewhampton 2 года назад +1

    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.

  • @waltherchemnitz
    @waltherchemnitz 2 года назад +1

    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.

    • @tsuki_4366
      @tsuki_4366 2 года назад +1

      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.

    • @Person1873
      @Person1873 2 года назад

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

    • @waltherchemnitz
      @waltherchemnitz 2 года назад +2

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

  • @shitpostingsandwhich
    @shitpostingsandwhich 2 года назад +4

    I don't know about you, but I don't have any 'libs' living in my computer.

  • @antonysgs150r
    @antonysgs150r Месяц назад

    That font is so small. It is difficult to see what you are typing.

  • @jakdev3443
    @jakdev3443 3 года назад

    clear and consise
    very cool

  • @madkvideo
    @madkvideo 3 года назад +16

    *noita_backups*
    BASADO

  • @ysink
    @ysink 3 года назад +1

    Wow nobody's here huh? Anyway yea cool video 👍

  • @Nacalal
    @Nacalal 3 года назад +5

    Automounting removable storage media is for cowards.

    • @PIKL_Creep
      @PIKL_Creep 2 года назад +5

      it is for people living in the 21st century.

    • @Nacalal
      @Nacalal 2 года назад +1

      @@PIKL_Creep aka cowards

    • @OcteractSG
      @OcteractSG 2 года назад +2

      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.

    • @Nacalal
      @Nacalal 2 года назад +4

      @@OcteractSG I know, I'm just shitposting, I still prefer to mount my phones storage on my PC using automated methods.

  • @bryteklabs1855
    @bryteklabs1855 3 года назад

    Thanks for this

  • @nico1337
    @nico1337 2 года назад +6

    usr actually stands for UNIX system resources

  • @paweszczepanski6738
    @paweszczepanski6738 2 года назад

    Noita!

  • @alexw.9175
    @alexw.9175 Год назад

    bros got a folder for noita_backups
    like its a rogue like for a reason 💀

  • @c4sper877
    @c4sper877 2 года назад +1

    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

  • @germas369
    @germas369 2 года назад

    i only watch you for your voice

  • @amalirfan
    @amalirfan 3 года назад +1

    What about share files
    /share and /usr/share

    • @fllthdcrb
      @fllthdcrb 2 года назад +1

      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

    • @thegovtdoesntcareaboutyou
      @thegovtdoesntcareaboutyou 8 месяцев назад

      i have this on ubutu@@fllthdcrb

  • @ankitdas7142
    @ankitdas7142 3 года назад +4

    11285* :P

  • @FilthyPitDog
    @FilthyPitDog 8 месяцев назад

    Directories > Folders

  • @pszyk.o.9074
    @pszyk.o.9074 2 года назад

    ...can only be one.
    Obi-Wan?

  • @KSPAtlas
    @KSPAtlas 3 года назад +4

    What happened here

  • @codyfsw
    @codyfsw 2 года назад

    NOITA!

  • @beef4722
    @beef4722 3 года назад +5

    Cd eeze nutz

  • @Vednier
    @Vednier Год назад

    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

  • @hashbrown777
    @hashbrown777 2 года назад +5

    "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

  • @kele8559
    @kele8559 2 года назад

    You need a 15 minutes video to understand how to open an folder??? Linux suxs