The Linux Directory Structure Simply Explained

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today I'm gonna try to explain the Linux directory structure so today we're gonna take a look at our Linux file system [Music] okay guys today we're gonna take a look at the Linux directory structure how directories or organized the hierarchy of the the directory structure in Linux so the first thing I want to do is I'm going to open up a file manager so I'm going to open up the Ranger file manager and of course it opens up by default in my home folder where we want to start though explaining the directory structure of course is in the root folder this is the topmost directory in the Linux structure alright and in your home folder you have I don't know 15 or so 15 to 20 directories in your home folder there may be some variants among different Linux distros exactly the the folders that will be in your root folder but for the most part you're gonna have the ones I talked about today the first one bin slash bin bin stands for binaries that is where the binary packages live on your system that's one of the places there are other bin folders on your system as well but slash bin is one of the places that binaries can be found on your system the next directory going down the list alphabetically is boot slash boot now the /boot directory contains files required for starting your system don't touch that directory unless you really know what you're doing and have a need to be in that directory don't go in the boot directory alright moving down the list dear dev slash dev slash devs devs stands for devices so when you say plug in a device like an USB stick or an external SSD drive or whatever you may have that's where it's gonna appear so it'll pop up there and that is you know when you plug in your live USB sticks or whatever you're booting off of sometimes you know there'll be slash dev slash sdb or whatever slash dev that is that that folder the next directory we need to discuss of course is the Etsy folder Etsy of course it stands for etc and the slash Etsy directory is a little confusing because really not sure exactly what gets put in that folder it seems to be kind of a dumping ground for the most part but a lot of what you find in the slash Etsy folder are config files for the most part some of the important stuff you find in the Etsy folder I know well let's just go ahead and go to the Etsy folder and I will scroll down through some of the stuff in the Etsy folder you find a Bluetooth crying d-bus G comp the G config you find iptables stuff further down system D you find the x11 folder this is where you would find your ex org comp file so a lot of important stuff and the Etsy folder moving down the list of the directories in the root directory home home is where of course your home folder is this is where all the users on the system have their home folders on my computer I only have one user DT that's why I only have DT here in the home folder of course if I there were multiple users but had other people living here using this computer you know say Mary was a user then we would have two home folders we would have home /dt and slash home slash Mary etc etc alright moving down Lib /lib slash Lib Lib stands for libraries this is where all the libraries live on the system you know a lot of programs you know they have a lot of extra libraries required to run the program that is where slash live and the one right before it /lib 64 that is what their 4th library's alright / mmm teas MNT basically stands for mount this is where where you would manually mount storage devices or partitions it's not something most Linux users have to deal with nowadays but that directory is still there alright moving further down the list of directories here in our root directory opt slash opt opt opt I believe back in the old days stood for option you can think of it as a optional standing for optional really and the OP directory is where the software you compile yourself usually gets installed in that particular folder that directory slash opt most of you probably don't compile a lot of your own program sometimes I do I'll find something that's just not in anybody's repos and you sometimes you just have to build it yourself that's that tends to be the folder that the directory where a lot of that stuff gets placed moving down the list here croc /proc very important folder proc stands for processes it is a virtual directory the information in it it's information about your cpu kernel hardware everything that's running on your system basically these files are generated basically as soon as your computer starts even while your computer's running everything in there is constantly being created deleted and it basically creates a folder for every single process running on your system moving down the directory structure here we have route route of course is basically you can think of it as the home directory for the root user the super user on the system now we head home up here slash home this is where all of your standard normal users have a folder but of course every computer has a super user a root user it gets its own special folder away from everybody else's home folder why because the standard users on your system in my case the DT user has no business being in the root users folder I don't need to be playing around with it you guys on your systems do not play around in that particular folder the root folder you have no business messing with that unless you really know what you're doing the next folder we need to discuss is slash run run is a newer addition to the Linux hierarchy it is system processes use it to store temporary data for their own purposes this is a directory that generally you never need to go in you don't need to touch it at all moving further down the list of our directories s been s been kind of like been four binaries SBN is also binaries but the S is for super user this is all the binaries for the applications that pretty much only the super user uses on the system so that would be for processes that install stuff delete stuff format stuff you know really kind of dangerous stuff to play in the next directory we should mention is slash serv SRV this is a server stuff I only have two subdirectories actually in this directory one for FTP File Transfer Protocol and HTTP so hypertext Transfer Protocol this is you know web server stuff here I don't really know anything about this particular directory I've never actually played around in the slash server directory the Syst directory is the next directory slash sis stands for system it's another kind of weird directory not exactly sure what the main purpose of this particular directory is but it basically it stores and allows modifications of the devices connected to the system so you see things like well devices and firmware hypervisor the kernel modules probably not a directory that we need to play around in either pretty much most of the directories in the root directory you don't want to play around in up but saying that the very next one in the list temp TMP temp of course stands for temporary this a lot of temporary files get placed here programs have a need to place temporary files on your system they'll use it for a little while and then when they're done with it hopefully that stuff gets deleted sometimes it doesn't but the temporary folder you can play around and yet you won't cause any damage matter of fact you can play around in the temp folder and you don't even have to be super user you could actually put your own temporary files in this particular folder if you wanted to the next folder in the list is one of the more important ones here one of the ones that we would use on a regular basis as Linux users particularly Linux desktop users is the user directory slash USR now most people call it the slash user folder just as I did but technically it doesn't stand for user it stands for I believe UNIX service repository I could be wrong about that but it actually is not is not a it doesn't stand for user but a lot of your user files actually do end up getting placed in this particular directory one of the things about the user directory it is where it used to be like kind of the home folder way back in the day in the early unix's this is kind of where that stuff used to get placed before there was a home folder nowadays of course all your stuff is in the home folder but still you have in the user directory we have subdirectories bin weight slash user slash again that is where all your binaries go but we had slash bin in the root directory so we have slash min and we have slash user slash in yeah we have two different bins but on most Linux systems these days the slash bin actually is just a symbolic link to slash user slash bin slash user slash bin is the real bin that is the ones that most Linux distros use and only use clicked on something there let me go back and now speaking further on the slash user directory I mentioned it's kind of an important directory for a lot of us Linux just users is because a lot of stuff that we would play around with if you're kind of a Tweaker you play around with your desktop a lot / user / share / fonts for example is where all the fonts on your system are located well if I can get to the font directory here the /user directory is rather large but / user / there / fonts is where your fonts are / user / share / themes would be where your themes are all your gtk themes are here and so forth and so on so those these are directories that you as a linux desktop user could play around in you need sudo privileges you need to be super user to add and remove fonts from that font directory and remove themes from the themes directory but for the most part you're pretty safe playing around in the slash user directory the next directory we want to discuss and the last in the list is slash bar var stands for variable not exactly sure why they call it a variable because I'm assuming it's they're calling it that because a lot of the files and stuff are dynamically created and it may be but that's no different than say slash run slash dev slash proc so I'm not really sure about that name but slash bar some of the important stuff and slash bar would be slash var slash log well of course is where all your log files would be located for those of you setting up maybe a web server you know you're installing a lamp stack on something slash bar /ww would be of course where all your files go for the web server and that is it that's all I'm gonna discuss again I wanted to keep this kind of simple I only wanted to go you know really one level deep on the directory structure here I just wanted to show you every folder here that is on slash root I know when I first started I didn't understand what a lot of these folders were what the names meant what the purpose of these folders are in fact just going through them there's still three or four of them like a little fuzzy on I'm not sure of the purpose and part of the reason is I'm not sure if the Linux community in general knows the purpose of some of these folders like I mentioned the slash Etsy folder it just seems like it's a miss miss miss mash of everything anything can get thrown in that folder itself anyway I hope this uh this brief little tutorial helped you guys before I go I do want to give a special thanks to all my patrons all my patreon supporters aka run mr. neatly pops John Bryan Karl Greg Carlos Rob Matt dark when Mark Christian Jake Benjamin Steve and Marcus interceptor Bob Lee or Omar and Silvio you guys are awesome you guys helped make this show possible these guys [Music]
Info
Channel: DistroTube
Views: 15,403
Rating: 4.8873239 out of 5
Keywords: Linux, directory, filesystem, files, root, bin, usr, etc, sys, var, home
Id: Avql2hfxx7c
Channel Id: undefined
Length: 14min 17sec (857 seconds)
Published: Sun May 06 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.