Ubuntu – the meaning of the default directories in the Linux filesystem hierachy

partitioning

Having installed various Linux distros for tinkering, I'm puzzled by the installers offering partition layouts – for an easy way out I just use the whole available disk space.

Some of the partitions offered have cryptic names, including /var, swap, /usr, and /home. The installers don't really explain these to me – what purpose do they serve, and which, if any, should be used?

Best Answer

The brief answer about directory names: type "man hier" into a terminal :)

That's the man page for the filesystem hierarchy, which explains the general purpose of the directory names and what they hold. You can see a web version here.

There's also more reading on Wikipedia:

Those links will explain everything about what partitions are called what and what they are (or were historically) used to store.

The answer about using seperate partitions rather than just directories in the same partition comes back to maintainability and expandability. If you've got one partition with, say, / and /home on it, Joe User can fill up his /home/joe folder, and the entire machine will run out of disk space and stop working (I'm simplifying here, but that's the general result). If you've got / and /home on different partitions, Joe User can fill up his /home/joe folder, and the /home partition will be full, but the machine will continue to operate because / is not affected.

So expand that principle out to almost all different directories being on different partitions, and you can see how it would be useful, particularly when a machine is running 24/7 in a multi-user and multi-service role.

Related Question