Just another partitioning layout

Alessandro Dotti Contra <alessandro@hyboria.org>
Revision: 1.3 - last updated 20060721

This is not the definitive layout for your Unix box. It's just another layout that seems to me a good balance between manageability and security. I won't make any assumption on how these partitions should be sized; it depends on the real role of the box, and on the installed version of Unix. Please note that I forgot to mention a swap partition; I assume you have already planned (at least) one in your own partitioning strategy.

/

This is the "root" partition. Here you can find all system's configuration files, init scripts, kernels, libraries, base binaries and so on. Probably you won't need / to be that big. For a Linux system, it might be useful to have a separate small /boot partition.

/tmp

This is the primary working area; temporary files are usually stored here. If you keep it on a dedicated partition it will be easier to apply some restriction (no-exec flag for example) when mounting it.

/root

This is the super user's home directory, and having it on a partition on its own is just a personal choice rather than a rule. Here you can put your custom administrative scripts and stuffs that only the super user can access.

/home

This is where your users will store their own personal data, and it's supposed to be the area of your system where they will do most of the things. Maybe personal web pages, which can be accessed from the outside, might be stored here.

/var

Logs and run time system's informations and data (the things that change). Keep them separate from the rest of the system; one reason might be to avoid to put your box on its knees if an application is too verbose in logging under odd circumstances. There are many good others, I'm sure.

/usr

All your software goes here, so it is a good idea to have some extra space available. If you can afford it, you can also mount it read-only after you finished the system's installation and setup. Be aware that restrictions can provide a more secure environment, but may impact any time you have to make updates or changes in your software configuration.

/usr/local (optional)

If you plan to compile software from source, this partition can be useful to keep you local changes separate from the rest of the system. It is not strictly needed.

/opt (optional)

Usually this partition contains third party binaries, which is best to keep separate from the official collection of software of your Unix flavor. It can be used for chroots as well.