 If you're coming from Windows, the Linux file structure can be a little confusing, simply because it's completely different than what you're used to on Windows. And if you are here for the first time, or maybe if you've never really explored your file system as a Linux user, you may not know that there are certain things that you shouldn't should not do, and you may not know a lot about the file system. So what I thought I'd do today is talk to you about five or six things that you should know about the Linux file system. And some of these are a little frivolous, some of them are very, very important. So kind of mixing it up there. So let's go ahead and jump in. The first thing that you should know about the Linux file system, and this is one of those frivolous ones, because it doesn't really matter at the end of the day. But there are no folders on Linux, they're called directories. Now, the reason why this really doesn't matter is because almost everyone who's come from Windows and has used Linux for no matter how long that has been, has called a directory a file somewhere along the line. I've done it many times. I still do it from time to time. And it's just kind of the way things work. So if you ever get corrected when someone says that's not a file or a folder that's a directory, just know that technically they're right. But it doesn't really matter at the end of the day, but they are directories. So that's the first one. I just thought I'd start out with an easy one. The next one is that there are no drive letters in Linux, at least not really. So if you've used Windows in the past, you know that there's a C drive there. And that is your main hard drive. That's where basically everything is installed. Any other drives that you connect to your computer after that are going to be given subsequent letters, so D, E, F, and so on. The A and B letters were given to floppy disk drives back when those things still existed. So on Windows, you have letter names for drives. On Linux, that doesn't really exist. Instead, they're giving designations like SDA, SDB, SDC. So if you want to kind of correlate those two drive letters on Windows, you can, they're kind of the same idea. They don't really function the same way. So don't really think of them as the same thing. Just think of them as naming being named the same, but being a little bit different if that makes any sense. So just for example, the reason why they're different on Windows, the C drive contains everything. So it doesn't really have anything to do with partitions or anything like that. If you had a different partition on Windows, it would be given another letter. So if you had a second partition on Windows, it would probably be D or something like that. At least I think that's the way it works. On Linux, if you have a partition, so your main drive is probably going to be like SDA. So if you have a regular SSD, not an NVMe or a spinning hard drive, it's going to be given the designation of SDA or SDB or something like that. The SDA part is going to consist of the entire drive and any partitions are going to be given a number underneath it. So say you have a drive with three partitions. So you'd have SDA as the whole drive, SDA one, two, and three. Those would be the partitions on that drive and they'd be kind of a subsection of that particular drive if and that makes sense because a partition is just a small subsection of an overall larger drive. Now, now all drives are given SDA, SDB names. If you have an NVMe, it gets a little bit more messy. And you would see this if you ran a command called LSBLK and you have an NVMe drive installed. And that's what you'll see in B roll here. Now the NVMe drives are given something usually NVMe and zero one P one something like that. It's not nearly as nice and clean as the SDA nomenclature so just know that the basic idea behind slash dev SDA also applies to the NVMe drives. It's just that they don't have as nice names. So there are no driver letters on Linux, but there are these STA, SDB things that correlate with the drives that are in your machine. So just a piece of trivia for you if you are interested, the SD and SDA, SDB, SDC and so on stands for SCSI or SCSI disk. So if you are or have been around the computing, you know, space for a long time, you probably remember things like I SCSI and things like that. And that stuff has been around for a very, very long time. So just a piece of information or trivia for you to bring out at parties, you know, if you go to parties. Anyways, moving on to the next one. So this one here is really interesting. So in Windows, capitalization doesn't really matter as far as I'm aware. So if you name, if you name something files in Windows, that's the only directory or file that could be named files. It doesn't matter how you capitalize it, because it's going to tell you that that file already exists, even if technically the capitalization between the two different files that you're trying to create are different. On Linux, that's not the way it works. You can create several different files as you're seeing on B roll. All named exactly the same thing, but each of them have a different capitalization mechanism. So, you know, in one, you'll have the f capitalized in one, you'll have the i capitalized one, you'll have the l capitalized and so on, right? Each of those are distinct files and are perfectly capable to exist in the same directory, no matter what. Obviously, you can't have two files or directories that are named exactly the same thing and capitalize exactly the same. That's not something that is possible, because then they'd be the same thing. But if you differ the capitalization somewhat, you can create two files or directories that are technically named the same thing just with different capitalization structures. So that is a cool trick if you need to, say, create a photos in a pictures folder or something like that, and you want to name them the same thing. Just capitalize one, don't capitalize the other, and you still have two distinct directories. The next one is that there are a few directories inside of your root directory that you should never mess with. And honestly, more in general, if you don't know what you're doing, don't mess around with anything that's in the root directory at all. That's the overall advice that I should give you. But if you are in there dabbling around and looking around or whatever, there are a few that you should just not mess around with at all. One of them is actually set slash dev. Now, the dev directory is where all of your devices are stored. And this includes things like SDA, SDB, SDC, and so on. So all of the drives that you have plugged into your computer reside there. You would think then that you would go in there to mess around with those drives, but that's not really where they're mounted. That's where the device info and stuff like that is stored. So you don't want to really mess around with any of that stuff unless you know absolutely what you're doing. So avoid the dev or dev directory, and you'll probably be happier for it. Another directory that you want to avoid pretty much at all costs is the boot directory. This has all of the information your computer uses to boot itself, things like grub or system reboot or whatever, all that stuff goes in that directory. And you do not want to accidentally delete something in there because your computer just won't boot. So stay away from the boot directory. The other one that they say to stay away from is the proc directory. Now this one is a little bit more iffy. You can mess around with the proc directory because there are some things in there that are very useful. You can get things like your uptime in there. You can get things like your CPU info that is stored in this directory. But there are also things in there that have to do with the processes that are running on your computer because every process that is running on your computer is stored inside PROC as a pseudophile. So if you have like say Pycon running, that is a process that is running on your computer that has a corresponding file inside of PROC. And if you were to delete those files accidentally or something like that, you would kill that process or at least cause some kind of problem. So the reason why they say to stay away from PROC a little bit is because those pseudophiles are in there and you really shouldn't mess around with them, at least in that manner, you can have other programs that will mess around with those things. So like H top or whatever, that gets a lot of the information from those files. So the next one on the list is that applications are stored all over the place on Linux. This isn't something that Linux does a lot different than Windows. On Windows, you have the program files directory or folder where all of the, or at least most of the programs that you download are stored. And it is a folder that is created on a per user basis. And that's just the way it works, right? On Linux, that's not the way it works. Developers can basically store their programs wherever they want when they're installed. It's not necessarily wherever they want, but there are many places where they can store them and where they choose is pretty much up to them. So some of it has to do with whether or not the program that is being installed is going to be system wide for all users or just for the specific user that it's being installed by. So if it's for system wide, it's probably going to be stored in the top most bin folder on your machine. It's not necessarily always going to be that way. Sometimes it's going to be in a different part of the path, but for certain situations, that's probably where it's going to be. But that's very rare when you download a program that it's going to be system wide. Usually applications that are installed are for your user only. So with that being the case, that means that there are going to be other places where your applications are going to be installed. And here's where it gets a little bit messy because some applications are going to be installed inside your home directory somewhere. So sometimes in local slash bin, whatever in your home directory, some of them are going to be inside of the root directory file structure somewhere in perhaps slash user slash bin. That's another common place for them to be installed in. And that doesn't even take into account things like flat packs or snaps, which store their applications completely in other places. So snap tends to install all of their programs in a directory called snaps. Sometimes that's in the home directory. Sometimes it's in the root directory. Depends on what distro you're on. A flat pack tends to install all of their stuff in dot var inside of the home directory. So as you can tell, application installation is very weird when it comes to Linux. This stuff can be in many different places. So if you find yourself in the situation where you need to find the binary for your application or a configuration file or something like that, chances are you're probably going to need to use the search functionality of Linux either using locate or find in the terminal to locate where those things are. It can be a little bit complex. And like I said, it's kind of a mess. The final thing that I want to talk about is that everything in Linux is a file. Now this is something that is both true and not true. It's true in the fact that the system creates a lot of files for pretty much everything. And it's not true in that not everything that it looks like a file is actually a file simply because it's temporary. If that makes any sense. So every process that is running on your computer, whether it's PyCom or Firefox or Alacrity or GNOME terminal or GNOME itself, whatever, every single one of those processes creates its own file. And it's given a process ID and that process ID is stored in slash proc inside of the root directory. So all that stuff is its own file. And then obviously the applications themselves have files and directories of themselves that have the binaries that they're created and all the libraries that they need to use in order to run and so on and so forth. Everything on Linux is a file. So the question is what does this mean for you? Well, it doesn't mean a lot, but it just really means that when you're trying to understand the Linux file system or Linux itself, just know that everything that you see, everything that you interact with, has some file somewhere that is what you're really interacting with. It's one of the reasons why the command line is so powerful because you can interact with anything inside of the command line because it's just simply a file. You can move it, change it, rename it, all that stuff. It is a file so you can do all the normal things that you would do with a file inside of the command line or in other places using a GUI if that's what you prefer. So those are the things that I think everyone should know about the Linux file system. I could have gone into much more in depth in terms of some of the more specific things on this list and there are tons more when it comes to understanding all of the files or whatever that are in the root directory. There are many files in the root directory that do certain things. So like slash media is usually where the system mounts all of your drives. Slash M&T, which usually shows up right next to it, is usually where you're supposed to mount manually mounted drives. So those two folders do basically the same thing, but one system managed, one is user managed, but they're both in the root directory. So as you can see, there's much, much more I could have explained when it comes to the Linux file system. If you want some more in-depth stuff regarding the Linux file system and you want a video about that, leave a comment in the comment section below. I'd love to hear from you. You can follow me in the master's on our Odyssey. Those links will be in the video description. You can support me on Patreon at patreon.com slash linuxcash. Just like all these fine people. Thanks to everybody who does support me on Patreon and YouTube. You guys are all absolutely amazing. Without you, the challenges would not be anywhere near where it is right now. So thank you so very, very much for your support. I truly do appreciate it. I also have links to Lee Berrape and the YouTube membership thing in the video description. So if you want to support me, you can find those links down there. Thanks everybody for watching. See you next time.