It's a bit short if you ask me... You didn't even explain the different file types e.g. block vs char devices, regular files, folders and so on. This is just a VERY rough overview of stuff everyone knows anyway.
@@davidpanic: "This is just a VERY rough overview of stuff everyone knows" I have asked 10 people on the street so far and none of them could tell me about any Linux directories, you sir have been caught in a lie
Its only nearly 3 mins! Having it in such a small space really forces you to explain the absolutely essential information and I found that really useful. I've watched numerous longer videos on this subject which still hadn't cleared up my questions of the purposes of these directories and this video has!
I have an old book and it says: "The /usr stands for Universal Shared Resources but it get usually referred as the "user" file because in the unix times, they need to save memory and that's why most of the folder has only 3 characters." That folder contains most of file shared across the system including wallpapers, themes and so on instead if users files.
Some of these are bacronyms applied long after the original purpose of the directory changed. /usr is indeed “user” because originally that’s where the user home directories were kept. /etc is “etcetera” because that’s where miscellaneous files were kept. The ping binary once lived there, for example. There is half a century of history attached to most of these directories.
Also note that naming brevity and acronyms in most / major older operating systems was the result of that memory crunch not for one file, but because things like %PATH% tended to grow as apps and references were added, to the point that there wasn't room to add more. Then you had to start deciding what you wanted accessible from anywhere and what you had to change to that directory to run.
Wow. I've been using Linux regularly in a graduate Operating Systems course for months now, but this very simple video filled in so many gaps in my knowledge that should never have existed. Well done!
For the most part ya. Or more accurately it's just that the Windows directory layout sucks and has extremely poor standards such as letting programs put stuff in the Documents folder which should just be a user folder similar to Pictures or Video. It still bothers me though that /etc is in the root directory is pretty much the same as the $HOME/.config directory or at least most files that go there would be. So why isn't there a /config root directory? Well the config directory wasn't a thing and by the time it was everyone was already putting all the config files in /etc so for backwards compatibility purposes things were just left left alone. At least that's what I was able to gather about the subject but feel free to correct me. Not even XDG which is organization that creates better standards for directory organization will touch /etc because it would be too much of a hassle at this point. If you do create a new unix-like system that has no compatibility with any existing software or systems then feel free to finally fix that standard have a /config directory. Though /etc would still exist it would be what it was meant for as an et cetera directory for things that don't quite fit in other categories. You might also think of it as a miscellaneous directory/folder as it has a similar meaning but /etc is shorter than /misc and just makes more sense.
Wrost part is when you have ransomewhere entered one dictionary in Windows , it somehow manages to accessed all your other files , like how in the f** K god shake 🤬 In Linux if it enters in suppose /download it won't get out of it ( generally) .. it's so simple , you delete them and it's gone ... But in windows This thing hasn't changed since past 20 years , and I believe they will never change it... ( Because who knows they earns profits from it?) @@brainstormsurge154
Duuude I can't belive the question that I have listed in my to-do list for half a year, and couldn't find any satisfactory answer to, is answered at the right level just by a 100 second video freely available on youtube! Thank you so much!
The most useful explanation is often the shortest one. Thank you for not taking 10 minutes for something very simple, even included the relevant commands!
You are GOATED for doing this video. I cannot express the true joy I have rn after watching few videos before this one that couldn't express the things you taught in 100 seconds in a timespan more than 15 minutes.
Interesting fact: at times when / had a limited storage capacity /bin and /lib used to contain the minimal programs necessary for init. /usr - containing the rest of the applications - was mounted during the init process. Today initrd mounting root is a similar pattern to how /usr was mounted back then.
It's worth noting that "/[s]bin" and "/lib" are separated because "/usr" was often mounted over NFS and you cannot boot the system when files required for it are located on a mountable resource, including programs used to mount it and set up the network. Also, you still need tools when mount breaks. Nowadays, initram is pretty much common and all tools required to mount/check/repair filesystems are packed into a ramdisk image. Mounting "/usr" from NFS share or a separate partition is no longer a thing, except in diskless terminals. That is why some Linux distributions today are merging "/usr/lib" with "/lib", "/usr/bin" with "/bin" and "/usr/sbin" with "/sbin" - it makes packaging easier at the cost of a feature almost nobody needs anymore. Additionally, separate user directories can be made a bit more secure by mounting "/home" with "nodev" and "noexec" flags which could not be done with the "old /usr scheme".
You know what? Every generation of coders has its own group of teachers. This dude right here is building the foundation for the new generation of -soydevs- programmers!
@@amongus-rq2hb I dont know how he did it, but I used m̶a̶g̶i̶c̶ fsymbols.com/generators/strikethrough/ theres other things you can do too, just query stuff on your favourtie search engine like text generators
Oh my God , dude this is probably the most exciting thing I experienced in the last month. I am so thrilled to use Linux now , for years I was just overwhelmed by the file/system and folder names and it all seemed too complex to me for some reason but thank you Fireship now I can see everything just CLICKED into place with your explanation , now I wanna use terminal and vim alone :) Thank you for the video and great in-depth content. , your efforts are much appreciated brother
"/sbin" didn't originally mean "system binaries" but static binaries. It was the place for binaries that you can run in case "/lib" is not available, contrary to "/bin" which require to load libraries from there. So "/sbin" binaries could be used pretty early during boot, as "/lib" may only become available later during the boot process and most of the binaries there were only supposed to be used by system administrators as "root" user, because other users would only become available even much later in the boot process. This lead to the wrong interpretation, that this directory was for system binaries that require root privileges, as that's what it in fact was but not on purpose and that was never what the "s" was supposed to mean. Today binaries in "/sbin" aren't static anymore and also require "/lib". And "/usr" came into existence because the main system was on a single floppy disk and by adding more and more binaries and libraries, at some point there was no space available anymore. So they had to move some less important stuff to a second floppy disk, which could resist in a second floppy drive. Yet the system required some place where to mount that second floppy and this place was "/usr", named that way as originally also the user home directories where located on the second floppy disk and "/home" didn't yet exist. And "/usr/local" came into existence when floppies got replaced by network shares. Instead of having hundred computers, each with two system floppies or expensive hard drives (the first ones were very expensive), the system was hosted on a central server. A lot directory choices come from that kind of pattern. And in case "/bin" and "/usr/bin" were both mounted from a central server, "/usr/local/bin" was the place for binaries to go that were, well, local, meaning "not from the network server" but stored on some local storage medium on this machine only.
ok wow this sheds much more light on the executables part. it always confused me that there are 4 places with executables, and the explanation given seemed unconvincing. Such gigantic minds wouldn't artificially segregate programs like this, that's just confusing, had to be a different explanation. I have a last question though, what is opt? j-links seggar installs itself there, autodesk maya as well i think. Why? do you maybe know?
@@masterofdizzzaster /opt was introduced a lot later and it was supposed to separate the software belonging to the system from the 3rd party software. The three layers so far (/, /usr/, /usr/local) existed because of data storage separation (/usr for a 2nd floppy, /usr/local for stuff not shared over network), but all of these places where for binaries, libraries and other files considered to be part of the operation system itself. Even if the system admin himself built those binaries (configure; make), those were considered system binaries as admins were supposed to customize the UNIX system to the need of their company/organization. The idea of UNIX was not that there is a monolithic system like Windows or macOS and you then smash 3rd party apps onto that system, the idea was that the system is only a framework and every company/organization makes their own operation system on the basis of that framework, tailored to their individual needs. And this customized OS could then be rolled out to all their servers or client systems, offering everything out of the box that the users and admins will ever need when working on that system or managing the system itself. Hence there was no need to ever install any 3rd party software, all software is part of the system itself. If your client systems needed an office software that was not part of the UNIX system you bought, then you'd build that software yourself, integrate it into that system (e.g. into /usr) and that is the system you roll out to your client systems. Users don't install software themselves, everything is centrally managed for you. And if some of your users require some scientific software, they'd tell their admin and their admin would integrate it for them. He could build it and first just copy it to /usr/local of individual machines, later on integrate it into /usr and with the next update rollout, everyone would have access to that software. However, this is not how other systems were organized, so where would you put ready to use 3rd party software ("apps"), that you don't have to build yourself, that is just a bunch of files in a single directly or maybe just a single file and that the user should be able to install himself without bugging the admin? That's what /opt was supposed to be. /opt is like /Applications on macOS or like \Programs in Windows. Just create a sub-dir for every app and copy the app files there; done. This process could be done by hand or by running an installer that does it for you. Yet UNIX pretty much died in the years to come, so the idea of /opt never really took off. One reason for UNIX dying was the success of GNU/Linux based systems. Linux offering a universal operation system kernel and GNU offering a UNIX compatible environment with all the standard shell commands people knew from UNIX based systems. And GNU/Linux was a system also for end users, who now were their own admins and would customize their own personal system. As a result, every software again became part of the system itself and to help technically less advanced people, package managers were used, so people didn't have to build software themselves, but instead customize their own systems by deciding which packages they want to install and pretty much all software delivered by those packages would integrate directly into the system and thus not use or need /opt. Assuming there was a system neutral GNU/Linux version of LibreOffice, that you can download from the project website, smash onto pretty much every GNU/Linux system, that does not come as a package but just as an installer (which may be a shell script) or a .tar.bz2 archive, then you'd install that app into /opt/LibreOffice. However, pretty much every distribution has a package version of LibreOffice that is centrally managed and integrates into the system and thus ends up in /usr and by installing that, LibreOffice becomes a fixed part of your customized Linux system.
Been using this (or the macOS version) for years and years and never really stopped to think about what the directories actually stand for. Great explanation!
It's amazing how common it is for stuff to be in the wrong place simply because folks don't know what each of these directories are intended to hold. I've used unix/linux for more than 2 decades and never knew there was an actual standard for the filesystem hierarchy. Thanks for providing 100 seconds of clarity. en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
Great video !! so let's say I have two curl installation one libressl in /usr/bin and one openssl in /usr/bin/local how do I force one over the other? is it by changing the priority in the path as you explained?
You can force one over other by using full path. Going deeper into the rabbit hole: If you simply type the `curl` command, It will execute the first curl it sees on the $PATH. If there is an alias named as `curl`, that will be executed before $PATH. You can ignore aliases by forward slash command `\curl` . For example, I have aliased `ls` into `exa` but if I need to use plain old ls command, I can do so with `\ls`. During shell scripting, If you know the full path of something, it is better to use that.
Run: echo $PATH Then you'll get something like: /bin:/usr/bin:/usr/local/bin Just swap those by rewriting the $PATH. To do that, just run: export PATH=/bin:/usr/local/bin:/usr/bin Problem solved, have a nice day :)
I haven't tried this but i guess you can create an Alias for openssl curl like opencurl so that when ran, it executes the curl present inside `/usr/bin/local` directory
25 years that I work and play on computers, i tried Linux plenty of times... This is literaly the best explenation i've seen in my life... and the shortest !! Amazing video 😮😍 thanks a lot
To find out where a command lives, you can indeed use "which". Under an AT&T type unix, you can also use "type". The difference betyween them is that "which" searches a standard list of places, whereas "type" looks along the PATH.
For me the hardest part was understanding that '/' is not particularly located anywhere on the drive. It weirded me out that '/mnt/X' and '/home' could be located on completely different storage devices.
That's definitely one of the biggest leaps of faith one has to make when going from Windows to Linux. In Windows, every partition has its own file system root: the drive letter. But in Linux, there is exactly and only one root to the file system: /. Partitions instead have mount points at various paths within the file system.
YES!! I've been faffing around with Linux on my laptops for 20 years, and this is the first time I've had the 'difference' between /bin and /sbin and /usr/bin etc explained in meaningful terms!
Linux is good and the hierarchy makes sense but.. the only thing you need to hope is that all apps follow the spec i.e put the files in the right places if you wish to find things, either that or I wouldn't mind if they put all their files in a folder containing the binary, contains it into a nice neat package
I've been running Linux since MEPIS 11 was a current distro -- currently Kubuntu 22.04 -- and never seen a good explanation of what all those folders under / were for. You made it make sense in less than three minutes.
Linux: "There is a place for everything and everything is in it's place." Windows: "Just cobble shit together, it will work out in the end. You want me to keep track of this stuff? Ya... no. What do you mean users need to interact with their files? I wasn't keeping count, were you??"
In opt is where third-party software is installed (that could be installed instead in the home directory), so IMO it's the best dir to place packages that you need to decompress and execute. It's an important directory.
As someone who was educated in the "DOS/Windows" school, and has recently installed Linux, I'm really starting to fall in love with the whole "UNIX philosophy"...I wish I'd encountered it long before now...
I'm basically the same. The fact that in Linux everything is just a file, and file extensions aren't even a thing seems backwards at first but is actually very freeing
I'm not even in the software area anymore (more of a hardware/networks person myself) & I still watch your uploads, your videos are just too damn good.
Another cool thing about the /tmp directory: it is a mounted section of the system memory (RAM and/or CPU cache). This is why the data is not persistent, as physical memory locations require active electrical power to keep the data present, compared to a storage device lik an SSD and HDD which store data without an active power supply. This directory being stored on ram also makes Read/Write operations in the directory WAY faster than elsewhere in the system, which makes it an ideal place to store runtime data for actively running tasks or data that needs to be shared by different processes.
This video went a little long, use the timestamps to skip the directories you already know
sheesh
It's a bit short if you ask me... You didn't even explain the different file types e.g. block vs char devices, regular files, folders and so on. This is just a VERY rough overview of stuff everyone knows anyway.
@@davidpanic it's 100 second, i think that is most of what casual user want to know and he did a good job explaining in the time constraint.
@@davidpanic: "This is just a VERY rough overview of stuff everyone knows"
I have asked 10 people on the street so far and none of them could tell me about any Linux directories, you sir have been caught in a lie
Its only nearly 3 mins! Having it in such a small space really forces you to explain the absolutely essential information and I found that really useful. I've watched numerous longer videos on this subject which still hadn't cleared up my questions of the purposes of these directories and this video has!
All i am sayin is that "HOW DOES THIS GUY KNOW WHAT I WANT? "
Right?!!! I feel like he has made a tutorial about every single piece of software to ever exist.
Because this dude is Bucky on cocain
Totally!
All I'm saying is that "HOW DOES THIS GUY KNOW LITERALLY EVERYTHING ABOUT EVERYTHING"
Seriously!!
As a systems administrator for Linux servers, this was amazingly accurate while being concise.
and as an icecream salesman, my statement has the exact same value if i say this was accurate and concise.
You’re so cool, please be my friend
@@zoolkhanLoL
@@nirash8018 I am not cool but wanna be friends
I have an old book and it says: "The /usr stands for Universal Shared Resources but it get usually referred as the "user" file because in the unix times, they need to save memory and that's why most of the folder has only 3 characters." That folder contains most of file shared across the system including wallpapers, themes and so on instead if users files.
It actually stands for Unix System Resources.
which book is it?
Some of these are bacronyms applied long after the original purpose of the directory changed. /usr is indeed “user” because originally that’s where the user home directories were kept. /etc is “etcetera” because that’s where miscellaneous files were kept. The ping binary once lived there, for example. There is half a century of history attached to most of these directories.
Also note that naming brevity and acronyms in most / major older operating systems was the result of that memory crunch not for one file, but because things like %PATH% tended to grow as apps and references were added, to the point that there wasn't room to add more. Then you had to start deciding what you wanted accessible from anywhere and what you had to change to that directory to run.
Doesn’t it stand for Unix System Resources?
Wow. I've been using Linux regularly in a graduate Operating Systems course for months now, but this very simple video filled in so many gaps in my knowledge that should never have existed. Well done!
*that seemed to have never existed
@@hksg nope, what he said is exactly correct
@@madhououinkyoma XD
I didn't realize how much sense and how well grouped is linux, yet so simple
For the most part ya. Or more accurately it's just that the Windows directory layout sucks and has extremely poor standards such as letting programs put stuff in the Documents folder which should just be a user folder similar to Pictures or Video.
It still bothers me though that /etc is in the root directory is pretty much the same as the $HOME/.config directory or at least most files that go there would be. So why isn't there a /config root directory? Well the config directory wasn't a thing and by the time it was everyone was already putting all the config files in /etc so for backwards compatibility purposes things were just left left alone.
At least that's what I was able to gather about the subject but feel free to correct me.
Not even XDG which is organization that creates better standards for directory organization will touch /etc because it would be too much of a hassle at this point. If you do create a new unix-like system that has no compatibility with any existing software or systems then feel free to finally fix that standard have a /config directory. Though /etc would still exist it would be what it was meant for as an et cetera directory for things that don't quite fit in other categories.
You might also think of it as a miscellaneous directory/folder as it has a similar meaning but /etc is shorter than /misc and just makes more sense.
Wrost part is when you have ransomewhere entered one dictionary in Windows , it somehow manages to accessed all your other files , like how in the f** K god shake 🤬
In Linux if it enters in suppose /download it won't get out of it ( generally) .. it's so simple , you delete them and it's gone ...
But in windows
This thing hasn't changed since past 20 years , and I believe they will never change it... ( Because who knows they earns profits from it?)
@@brainstormsurge154
Duuude I can't belive the question that I have listed in my to-do list for half a year, and couldn't find any satisfactory answer to, is answered at the right level just by a 100 second video freely available on youtube! Thank you so much!
Fun fact: /bin and/or /sbin are sometimes symlinks to /usr/bin/ and are there for compatibility purposes.
As a linux noob, I knew that, but this is still an important comment.
The most useful explanation is often the shortest one. Thank you for not taking 10 minutes for something very simple, even included the relevant commands!
Please make a "how to get a girlfriend in 100 seconds.". Something I have never been able to master.
LOL to distill this amount of knowledge to 100 seconds takes one small sacrifice: thou shall renounce all knowledge of how to get a girlfriend.
It's probably easier than learning vim to be honest.
1. Go to a park
2. Find a girl
3. Talk
@@JoHn-gi1lb ...
4. Wait for 15 seconds of awkward silence
5. Expect pepperspray to the face
6. Cry - and run back to basement
Step 1. Aquire chloroform
usr stands for Universal System Resources*
Good call, I guess only in the early days in meant "user" tldp.org/LDP/Linux-Filesystem-Hierarchy/html/usr.html
USSR lol
@@MM-vr8rj Universal Socialist System Resources? :P
LOL
One day, we'll reach a point when the Unix abbreviations will be so old, that no one will know what they once stood for
You are GOATED for doing this video. I cannot express the true joy I have rn after watching few videos before this one that couldn't express the things you taught in 100 seconds in a timespan more than 15 minutes.
Interesting fact: at times when / had a limited storage capacity /bin and /lib used to contain the minimal programs necessary for init. /usr - containing the rest of the applications - was mounted during the init process. Today initrd mounting root is a similar pattern to how /usr was mounted back then.
It's worth noting that "/[s]bin" and "/lib" are separated because "/usr" was often mounted over NFS and you cannot boot the system when files required for it are located on a mountable resource, including programs used to mount it and set up the network. Also, you still need tools when mount breaks. Nowadays, initram is pretty much common and all tools required to mount/check/repair filesystems are packed into a ramdisk image. Mounting "/usr" from NFS share or a separate partition is no longer a thing, except in diskless terminals. That is why some Linux distributions today are merging "/usr/lib" with "/lib", "/usr/bin" with "/bin" and "/usr/sbin" with "/sbin" - it makes packaging easier at the cost of a feature almost nobody needs anymore. Additionally, separate user directories can be made a bit more secure by mounting "/home" with "nodev" and "noexec" flags which could not be done with the "old /usr scheme".
More Linux videos please, this one was awesome
No stupid time wasting intro, no "hey gaise pls subscribe to muh channel bro" crap, no sir, This gets to point. Definitely subscribing.
Easily the best content about linux filesystem ever. Amazing!
100 seconds and every second is worth watching. Very very very helpful and informative. The common Linux-User salutes you! Well done!
This video is an essential for every Linux beginner. Informative and concise.
Thanks!
You know what? Every generation of coders has its own group of teachers. This dude right here is building the foundation for the new generation of -soydevs- programmers!
Jeff is the Bucky of 2020
@@AreyHawUstad Hit the nail on the head with this one.
how did you strike that word
@@amongus-rq2hb I dont know how he did it, but I used m̶a̶g̶i̶c̶ fsymbols.com/generators/strikethrough/ theres other things you can do too, just query stuff on your favourtie search engine like text generators
@@AreyHawUstad But Bucky is back!
Oh my God , dude this is probably the most exciting thing I experienced in the last month. I am so thrilled to use Linux now , for years I was just overwhelmed by the file/system and folder names and it all seemed too complex to me for some reason but thank you Fireship now I can see everything just CLICKED into place with your explanation , now I wanna use terminal and vim alone :) Thank you for the video and great in-depth content. , your efforts are much appreciated brother
"/sbin" didn't originally mean "system binaries" but static binaries. It was the place for binaries that you can run in case "/lib" is not available, contrary to "/bin" which require to load libraries from there. So "/sbin" binaries could be used pretty early during boot, as "/lib" may only become available later during the boot process and most of the binaries there were only supposed to be used by system administrators as "root" user, because other users would only become available even much later in the boot process. This lead to the wrong interpretation, that this directory was for system binaries that require root privileges, as that's what it in fact was but not on purpose and that was never what the "s" was supposed to mean. Today binaries in "/sbin" aren't static anymore and also require "/lib".
And "/usr" came into existence because the main system was on a single floppy disk and by adding more and more binaries and libraries, at some point there was no space available anymore. So they had to move some less important stuff to a second floppy disk, which could resist in a second floppy drive. Yet the system required some place where to mount that second floppy and this place was "/usr", named that way as originally also the user home directories where located on the second floppy disk and "/home" didn't yet exist.
And "/usr/local" came into existence when floppies got replaced by network shares. Instead of having hundred computers, each with two system floppies or expensive hard drives (the first ones were very expensive), the system was hosted on a central server. A lot directory choices come from that kind of pattern. And in case "/bin" and "/usr/bin" were both mounted from a central server, "/usr/local/bin" was the place for binaries to go that were, well, local, meaning "not from the network server" but stored on some local storage medium on this machine only.
ok wow this sheds much more light on the executables part. it always confused me that there are 4 places with executables, and the explanation given seemed unconvincing. Such gigantic minds wouldn't artificially segregate programs like this, that's just confusing, had to be a different explanation.
I have a last question though, what is opt? j-links seggar installs itself there, autodesk maya as well i think. Why? do you maybe know?
@@masterofdizzzaster /opt was introduced a lot later and it was supposed to separate the software belonging to the system from the 3rd party software. The three layers so far (/, /usr/, /usr/local) existed because of data storage separation (/usr for a 2nd floppy, /usr/local for stuff not shared over network), but all of these places where for binaries, libraries and other files considered to be part of the operation system itself. Even if the system admin himself built those binaries (configure; make), those were considered system binaries as admins were supposed to customize the UNIX system to the need of their company/organization.
The idea of UNIX was not that there is a monolithic system like Windows or macOS and you then smash 3rd party apps onto that system, the idea was that the system is only a framework and every company/organization makes their own operation system on the basis of that framework, tailored to their individual needs. And this customized OS could then be rolled out to all their servers or client systems, offering everything out of the box that the users and admins will ever need when working on that system or managing the system itself. Hence there was no need to ever install any 3rd party software, all software is part of the system itself.
If your client systems needed an office software that was not part of the UNIX system you bought, then you'd build that software yourself, integrate it into that system (e.g. into /usr) and that is the system you roll out to your client systems. Users don't install software themselves, everything is centrally managed for you. And if some of your users require some scientific software, they'd tell their admin and their admin would integrate it for them. He could build it and first just copy it to /usr/local of individual machines, later on integrate it into /usr and with the next update rollout, everyone would have access to that software.
However, this is not how other systems were organized, so where would you put ready to use 3rd party software ("apps"), that you don't have to build yourself, that is just a bunch of files in a single directly or maybe just a single file and that the user should be able to install himself without bugging the admin? That's what /opt was supposed to be. /opt is like /Applications on macOS or like \Programs in Windows. Just create a sub-dir for every app and copy the app files there; done. This process could be done by hand or by running an installer that does it for you.
Yet UNIX pretty much died in the years to come, so the idea of /opt never really took off. One reason for UNIX dying was the success of GNU/Linux based systems. Linux offering a universal operation system kernel and GNU offering a UNIX compatible environment with all the standard shell commands people knew from UNIX based systems. And GNU/Linux was a system also for end users, who now were their own admins and would customize their own personal system. As a result, every software again became part of the system itself and to help technically less advanced people, package managers were used, so people didn't have to build software themselves, but instead customize their own systems by deciding which packages they want to install and pretty much all software delivered by those packages would integrate directly into the system and thus not use or need /opt.
Assuming there was a system neutral GNU/Linux version of LibreOffice, that you can download from the project website, smash onto pretty much every GNU/Linux system, that does not come as a package but just as an installer (which may be a shell script) or a .tar.bz2 archive, then you'd install that app into /opt/LibreOffice. However, pretty much every distribution has a package version of LibreOffice that is centrally managed and integrates into the system and thus ends up in /usr and by installing that, LibreOffice becomes a fixed part of your customized Linux system.
@@xcoder1122 thanks that was informative
Oh yes, thank you very much for clearing things up!
I've taken linux classes on/off for years. No one has ever explained this. This really helps.
You don't need Linux classes, just daily drive Linux for 1-2 years and this will become common sense.
This man can smell all the questions our hearts ask in silence, and he answers them puclicly here for us every week. 🙌
I didn't know I wanted this video until UA-cam suggested it to me and I watched it, but in retrospect, I really wanted this video.
Damn, I can't handle this onslaught of "Explained in 100 seconds"
It's only going to get worse from here
@@Fireship they are great. yes more please!
i use J, K, L buttons for rewind/pause/forward, if i missed something or need more time to think about
Hey, thanks! I've been running Unix/Linux for almost 40 years, and nobody every told me the etymology of */etc* ! Youre' the man!
Your channel is underrated
Tell your family and friends!
549k, how is that underrated?
@@Fireship they are non programmer these are just like kala akshar bhensh barabar to them 😂😂😂 (I hope you got what i mean)
@@yigitsr I think that he is underrated as a yt channel, but is a popular one as a yt channel about programming
@@yigitsr exactly
Been using this (or the macOS version) for years and years and never really stopped to think about what the directories actually stand for. Great explanation!
the macOS variation is more confusing
It's amazing how common it is for stuff to be in the wrong place simply because folks don't know what each of these directories are intended to hold. I've used unix/linux for more than 2 decades and never knew there was an actual standard for the filesystem hierarchy. Thanks for providing 100 seconds of clarity. en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
I feel like I just leveled up my understanding of Linux drastically with this video. Knowing and understanding the file system is half the battle!
The knowledge that exists in this channel alone is gold.
Your 100 seconds videos always answer my questions whose answers I've been wanting to know since ages...but never searching..
Great video !!
so let's say I have two curl installation one libressl in /usr/bin and one openssl in /usr/bin/local how do I force one over the other? is it by changing the priority in the path as you explained?
which ever appears in path first will be the one that gets called. in order to specify a different one you have to type the full path to the binary.
You can force one over other by using full path.
Going deeper into the rabbit hole:
If you simply type the `curl` command, It will execute the first curl it sees on the $PATH. If there is an alias named as `curl`, that will be executed before $PATH. You can ignore aliases by forward slash command `\curl` . For example, I have aliased `ls` into `exa` but if I need to use plain old ls command, I can do so with `\ls`. During shell scripting, If you know the full path of something, it is better to use that.
Hey man big fan of your content.
Run:
echo $PATH
Then you'll get something like:
/bin:/usr/bin:/usr/local/bin
Just swap those by rewriting the $PATH. To do that, just run:
export PATH=/bin:/usr/local/bin:/usr/bin
Problem solved, have a nice day :)
I haven't tried this but i guess you can create an Alias for openssl curl like opencurl so that when ran, it executes the curl present inside `/usr/bin/local` directory
25 years that I work and play on computers, i tried Linux plenty of times... This is literaly the best explenation i've seen in my life... and the shortest !!
Amazing video 😮😍 thanks a lot
"/opt ...you'll rarely interact with it"
Me: dumps all downloaded software in /opt
This is me. My brain is too small to grasp the sophistication of Linux.
@@electron8262 I might blow your mind, bit there's nothing stopping you from making your own directories in root.
I have /games and /remote there
@@supersonictumbleweed thats fucking pathetic
I store all my docker mounts in /opt... oops :)
@@windowsxseven i see your mind is blown already
2.52 mins very well spent. Amazing job by Fireship, Subscribed!
I'd love to see your best practices for an efficient (glitch free) programming/web dev file management system. And how this helps your git hub usage.
YES
omg never seen such short & easy instruction on Linux filesystem. Instant sub.
What the hell, this guy dropping videos faster than linus dropping $10K CPU.
Good One
😂😂
To find out where a command lives, you can indeed use "which". Under an AT&T type unix, you can also use "type". The difference betyween them is that "which" searches a standard list of places, whereas "type" looks along the PATH.
For me the hardest part was understanding that '/' is not particularly located anywhere on the drive. It weirded me out that '/mnt/X' and '/home' could be located on completely different storage devices.
That's definitely one of the biggest leaps of faith one has to make when going from Windows to Linux. In Windows, every partition has its own file system root: the drive letter. But in Linux, there is exactly and only one root to the file system: /. Partitions instead have mount points at various paths within the file system.
You’re right about mount points, but not sure why you think root isn’t located in the root partition.
The illusion gif was the most perfect edit i've seen in my life
Very well done! Been using linux for a while and never knew what those folder names stood for. Thanks!
I've used Linux (Ubuntu) as my primary desktop and server OS for 13 years and I still found this useful.
Small Correction: /usr actually means Unix System Resources
1. Universal System Resources
2. Unix System Resource
3. User System Resources
4. ........................................?
Whats your choice?
@@FitraRahim Rule out #3, user system resources would be ~/.local
Came here to say that
YES!! I've been faffing around with Linux on my laptops for 20 years, and this is the first time I've had the 'difference' between /bin and /sbin and /usr/bin etc explained in meaningful terms!
Your voice is soooooooooo soothing :) and the videos are on a whole another level
For every other channel and web page in the internet, WAS IT SO FUCKING HARD TO EXPLAIN IT LIKE THIS?
Nicely done fireship, ty.
Proud to have worked on the linux kernel!
Ok
This is the most useful 100 seconds video ever made on Linux.
Diary of a madman: watching this at 2x speed.
The best experience
haha. i did this. lol
1x is scary enough lol
I usually watch others videos 2x. But video from here I have to slow it down
@Rob Hartle. With that way, you can save 50 sec.
I feel the urgent need to mention, that this was a nearly perfect summary for me. More of that pls!
Legend says Jeff will reply if you're early
Not every legend is a myth
@@Fireship lol
i want too
The best explanation about the Linux directories in a short amount of time. Now the Linux directories makes sense!
Linux is good and the hierarchy makes sense but.. the only thing you need to hope is that all apps follow the spec i.e put the files in the right places if you wish to find things, either that or I wouldn't mind if they put all their files in a folder containing the binary, contains it into a nice neat package
like in a flatpak
@@vilian9185 yep, I use flatpaks all the time, that's why the issues of binary install is so obvious
You have just done what no one else I have ever known who tries explaining linux to me has ever done.. explain anything.
Yes... 16 timestamps in a 3 minute video
I've been running Linux since MEPIS 11 was a current distro -- currently Kubuntu 22.04 -- and never seen a good explanation of what all those folders under / were for. You made it make sense in less than three minutes.
Jeff... thank you. You always one-up my expectations.
These were the 100 seconds with the highest meaningful-information-per-time density of my entire life!
Finally I can interface with my 5.25" disk drive.
You're a real time saver and life saver....
One video and I'm hooked...
Linux: "There is a place for everything and everything is in it's place."
Windows: "Just cobble shit together, it will work out in the end. You want me to keep track of this stuff? Ya... no. What do you mean users need to interact with their files? I wasn't keeping count, were you??"
if windows were a programming paradigm, it would be: "just put everything in main() and hope it runs"
Even windows has a structure
I definitely needed this. Linux always intimidates me with these folders and how they magically do different things.
AWS services in 100 seconds please
Not possible)
In opt is where third-party software is installed (that could be installed instead in the home directory), so IMO it's the best dir to place packages that you need to decompress and execute. It's an important directory.
DOM in 100 seconds please
Holy F, where were you in my life when in started using Linux at work. No one ever explained it this succinctly.
2:52 mins ! = 100 secs 😂
This is one of the videos where liking, subscribing, putting it in favorites and sharing is simply not enough.
100 seconds for
Devops, secops, dvcs, cvcs, jenkins, services of aws, Code quality Check......
Really appreciate you taking the time to explain this!
SSH in 100 seconds?
not possible. I dare him to do it
I'd love to see that! :D
First fireship video I watched! Learned so much from you!
Awesome video!!
Please people, stop using Windows and use Linux!!!
You can use both with WSL, but I feel you.
Rarely do I encounter a video so deserving of a like. Keep up the good work!
Webhooks in 100 seconds?
This short format is perfection!
windows directories in 100 seconds
No.
@@RavianXReaver yes
*God please no*
Dude, This is awesome cause you can wrap this content in just 2.50 min.
How to get job in 100 second 👍
never been more satisfied with a narrator. usually i speed listen, but this is the first time i slowed down.
If you watch it at 1.75 speed then you have 172 seconds /1.75 = 98.2 ≈ 100 seconds :)
I love watching these 100-second clips instead of watching a 15-minute video to get a rough idea of the concept.
As someone who was educated in the "DOS/Windows" school, and has recently installed Linux, I'm really starting to fall in love with the whole "UNIX philosophy"...I wish I'd encountered it long before now...
I'm basically the same. The fact that in Linux everything is just a file, and file extensions aren't even a thing seems backwards at first but is actually very freeing
I'm not even in the software area anymore (more of a hardware/networks person myself) & I still watch your uploads, your videos are just too damn good.
Your videos keep getting better and better
An excellent video, concise and informative. I'd personally like to see this as a 5-10 minute video
Really love these videos even if I already know everything you talk about. Just the quality is top-notch. Love it. See you soon!
Man you are a legend. I have watched a couple of long videos on the subject but it wasn't as good and simple to digest as your video
Another cool thing about the /tmp directory: it is a mounted section of the system memory (RAM and/or CPU cache). This is why the data is not persistent, as physical memory locations require active electrical power to keep the data present, compared to a storage device lik an SSD and HDD which store data without an active power supply. This directory being stored on ram also makes Read/Write operations in the directory WAY faster than elsewhere in the system, which makes it an ideal place to store runtime data for actively running tasks or data that needs to be shared by different processes.
Almost perfect video. I wish he kept an overview shot of all folders and just highlighted each as he moved on.
Never got it explained in such a fast and good manner.
This is perfect. No time wasted, no bullshit talk.
Like I think! 40 years of DOS here. Slowly forgetting C:\, DIR, Config.sys etc for the Pi. This does help!
The simplest and best explanation found so far!
As someone who has been using Linux for less than a year, the filesystem makes so much more sense than whatever windows does
Thanks for clean explanation of the folder hierarchy