Linux File System Explained: EXT3, EXT2, FAT32

Linux File System Explained: EXT3, EXT2, FAT32

For those of you coming from windows backgrounds, the way the Linux filesystem is laid out may seem confusing at first glance…. but that is where this article comes in!

The first thing you should know when working with Linux, is that everything is treated as either a file or directory. Yes that’s right, even hardware is considered a file by Linux,  and, speaking of hardware… all your hardware devices are located in the /dev directory, but more on that later.

Another thing that confuses windows users, is the fact that Linux doesn’t use drive letters to distinguish between different partitions and devices. that is to say in Linux, the “root” of your filesystem is / whereas in windows it would most probably be C: . Drives in Linux are “mounted” to directories where their data can then be accessed, so for instance, if you needed to use your thumb drive, you would plug it into your computer, and then mount it using the “mount” command, which specifies the path to the device ( something like /dev/sdb or /dev/sdc ) and the directory to mount it to (usually /mnt or /media), then you can happily access your drive from the /mnt or /media folder.

Sounds strange right? well yes it does if you come from a windows environment, where the entire operating system is consolidated onto a single drive. However, with Linux and the ability to mount devices as directories, it gives the end-user much greater flexibility in splitting up their operating system over several drives or partitions.

to understand what I mean when I say that this approach in mounting drives grants flexibility, I must first explain the different folders in Linux and what they store

Diagram showing Linux filesystem hierarchy

The graphic above shows the Linux filesystem hierarchy, now will explain in a bit more detail what each folder contains.

/  this is the root folder, all other folders come under root.. think of it as C: in a Windows context.

/bin  this folder contains all the user-essential binaries (programs) that are needed to administer and run your Linux system… delete this folder and your system is broken.

/boot  as the name suggests, this folder contains configuration files and other necessary files that are needed by the boot loader

/dev  this folder contains device files (remember, these files represent physical devices, so be careful when working with them)

/etc  this folder contains all the configuration files used by the system, you can also start and stop services (daemons ) from here

/home this folder contains the home folders of all the normal (non – root ) users on the system .. think of it as my documents in windows

/lib this folder contains software libraries

/media this is a mount point for removable devices… this is where you would usually mount your thumb drives… etc

/mnt  this is a temporary mount point

/opt this folder contains add-on software (extra software)

/sbin this folder contains binaries that can only be run as the root user (“superuser”)

/tmp this folder contains temporary files that are erased upon reboot

/usr this folder and its sub folders contains user installed programs and utilities and libraries

/var this folder contains files that change a lot (“Variable files”)

/root this folder contains the root user’s files

/proc this is a pseudo folder, that contains information about the Linux kernel and hardware that is updated in realtime.

Now back to how mounting grants flexibility…

you see how the different folders all contain parts of the operating system? well we can actually mount a separate hard drive for each of this folders. for example, your /home folder can be put on another hard drive than your / which means that you can easily recover your personal files if the hard drive on / fails because the hard drive mounted to your /home folder is separate from the one that is mounted to your /

So there you have it, you now know a little bit more about the nuts and bolts of Linux based operating systems. I hope now you know about Linux file systems, EXT3, EXT2 and FAT32.

19 thoughts on “Linux File System Explained: EXT3, EXT2, FAT32”

  1. I must say this article has given me much more insight on what Linux file system is..great article…great site! 🙂 Never seen Linux explained so easily.
    Btw I’m not even a native English speaker! 🙂
    thanks again..

  2. I understand the discomfort of looking at other options, but I stopped using Windows on my personal computers about 2 years ago. I changed to Ubuntu because I found it to be reasonably easy to use and the support is terrific.

    A quick explanation of why I switched. I’m running a copy of Windows in Virtualbox for the few programs that I’ve not been able to find an Open Source replacement for the Windows program (iTunes is one only because you can’t access the iTunes store in the replacements like Songbird and Amarok). My Ubuntu system is kept up-to-date by one simple program that installs and keeps current free, Open Source programs. All programs and the Operating System are updated through the same process and all are done simultaneously with the three clicks. It’s fantastic. By the way, although I have an anti-virus program installed in Ubuntu, I don’t run it on a daily basis. In fact, I ran it yesterday for the first time in six months and the computer was clean.

    On the other hand, I’m in the process up updating my Windows, Virtualbox instance. First it wanted to update my anti-virus. Then it wanted to do a security update for Windows – including a restart. then it requested an update to Adobe and a separate update to HP Digital Imaging Monitor. Granted, I’m running Windows XP, and maybe Windows 7 is better handling this process, but since I stopped paying Microsoft for upgrades, I can’t speak to that.

    Bottom line is, if you have an open mind and aren’t afraid of learning something new, try Ubuntu or some other popular version of Linux. It will pay off big in the long run. And don’t worry about the complexity of the underlying system. Stay with the Graphic Interface. For the most part, just like Windows, you don’t need to use the command line or deal with the filesystem that the Author has nicely documented.

  3. well yes could be confusing,considering a different system as windows is so unreliable but could accidentally delete bin thinking it was the recycle bin,does seem a bit complicated for the average user,maybee better for businesses ect,have to do a coarse at tafe I think to understand it better

  4. I found this article really interesting and helpful
    but You should add some commands to do some sort of operations so that beginers dont have to google for commands

  5. Very confusing at the end, you do not explain the different mount points well enough. eg. sda sdb and so on so the comment about keeping files safe is completely lost in translation. Nice try, buy do a better job of explaining the basics before tossing out irrelevant and confusing ideas or you will confuse people more than help them as indicated by all comments.

    • You do not have to mount anything in mainstream Linux Distributions today and if you want to, fill your hat. There are many distros that will cause your hair to fall off and your pets to leave home. Windows, Mac and Linux are too complicated for the average Operating System user today. Most Windows and Mac users including those from the 80’s are newbies and never will exceed that level.

  6. /home/ != “my documents in windows”
    if compare, /home/ == “Documents and Settings” or “Users” in later windowses.
    /proc/ MAINLY contains information about processes, not only system info.

  7. Linux is complicated compare to windows.. u have to mount the device and etc is difficult for a beginner. Moreover the directory names are so much complicated. It is not an OS for a normal user.

  8. yes Thanks for giving some idea about linux. generally i afraid from linux but this article makes me some strong infront of it.

      • OK, I’m new but come on…. you can have multiple drives in Windows and yes you can have the My Documents on the that other drive as well. So if your OS dumps you can still have saved data. As I always say… its not backed up unless it is in at least two places! One drive fails you have the other. Loving Linux…

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.