Linux File System Summary
Saturday, January 19th, 2008As you probably know in Ubuntu everything is under the root or /. All drives that you will ever use will start with /. That doesn’t mean that they’re not segregated from your OS and application stuff.
Let’s say you have 3 drives. You have one drive house the / paritition. Within that, you can have another drive house the /home partition, and yet another the /media/files partition. If your / drive somehow dies, you still have the /home and /media/files housing drives intact! You can simply reinstall the OS and get back to work. The point I’m trying to make is that while it seems that everything in Ubuntu is a single drive, is may only seem this way.
By default, unfortunately, everything like / and /home and /etc and /bin and al the other directories are on the same drive. In this case, you are putting everything on the equivalent of the C: drive in Windows. So the thing that you need to do if you happen to be a neat freak like me, is put /home on a separate partition (or preferably drive). This will allow you to keep using your /home after reinstalling and often even using other flavors of Linux. And best of all, you keep most of your program settings. This is the equivalent of being able to move Windows user folders located under documents and settings between computers (which you can’t). Most people I know who use more than a couple of hard drives simply mount all their hard drives under /media. Let’s say that you have /media/storage and /media/storage2. This is the equivalent of D: and E: in windows. If you lose the main OS install for some reason, you will still be left with both storage and storage2.
So in conclusion, in Linux you will always see the same basic structure, but beneath it you can have the order you love.
You can easily see which partition is mapped to which location in your file system by running a simple command. Open a Terminal window and type:
df -h (note: the -h modifier is used to present you with human readable size information)