Posted:
21 Jan 07

P
A
G
E

S
I
X


O
F

N
I
N
E

Linux Partitions - The List

Here is a list of the basic folders in Linux and why you might or might not want to put them on their own partition:

/ - root partition. Contains all folders that have files or mount points. This has to be on its own partition because it is the root folder for all other folders. Typically, you would want a few Gigabytes for /. If you create separate partitions for /usr, /home, and /var, root could be much smaller (maybe 500MB.)

/usr – Contains files that don't change very often. Usually program files installed by the operating system. You will want at least 500 MB for /usr. A few GB is better if you can spare it. /usr contains /usr/local, which is where programs you install yourself usually end up.

/home – Contains your personal files. This can be anything from a few text scripts to all of your music and movies. Only you know how much personal stuff you have, so make this partition big enough to handle whatever you will store in it. In general, you won't regret making this directory very large.

Although /home doesn't require its own partition, I highly recommend it. That will make upgrading, backup, and recovery of your system much simpler and faster because you can upgrade the operating system without disturbing your personal files. With a separate /home, I have been able to upgrade my operating system without loosing any email, themes, settings, shortcuts, preferences, or even internet bookmarks, which makes the new features in the new OS much more fun when I don't have to spend several hours (or days) resetting everything after upgrading.

/var – Contains files that change often, or are variable. Making this a separate partition helps keep you from running out of disk addresses. Since /var contains lots of small files, sometimes log files will accidentally use up too much disk space and temporarily crash the system if /var is on the same disk partition as /.

If you are just running a desktop for personal use, you are probably safe not making a separate partition for /var, but I recommend it for a server. You don't need much space for /var. Check your distribution FAQ if you are unsure, but 100MB is enough for Ubuntu and most other desktop distributions.



/tmp – Contains temporary files. Usually 100MB is more than enough, but again, check your distribution installation instructions if you aren't sure.

/boot – This contains the files needed to boot the system, including the kernel and any initial ram disks. You only need to make this a separate partition if you want to use software RAID or other disk structure. If you don't know why you need a separate /boot partition then you probably don't – it is safe to include this on the / partition. If you do make it a separate partition, 100MB should be more than enough. You can get away with 50MB if you don't plan to do very many upgrades.

/bin and /sbin – These contain binary files. These are usually commands and tools to help you interact with the operating system. /sbin has security sensitive binary files. I usually just put this on the root partition.

/etc – Contains configuration files for the operating system and programs. This folder has to be on the root partition. The system will not boot correctly if this is on a separate partition, because the system needs to read the /etc/fstab file in order to mount disks during startup.

/dev – This folder doesn't actually exist on your disk. It only exists in memory. It contains all the devices, or hardware addresses, for your system. You normally don't need to interact with this directory.

/proc – This also only exists in memory. It contains information about your system status, such as the speed or your processor and the amount of available memory.

/root – The root user's home directory. This normally doesn't have much in it and can usually be included on the same partition as /.

/mnt – Commonly used to mount things like a CD-ROM or a USB flash disk. Does not need its own partition.

/lib – contains libraries. Does not normally need its own partition.

Partitioning the disk

You can create your disk partitions in any way that you are comfortable. You can partition it from Windows before starting the Linux install, you can boot from a Linux LiveCD and partition it, or most distributions have a disk partitioner built into the installer that you can use. I can't provide instructions here because every distribution does this differently, so read your distribution installation instructions if you need help. Ubuntu and most other distributions include a straightforward partitioning utility in the install.

Next =>[Magoo's Introduction to Linux- Page 7, How Linux Works]

Skip to page: 1 2 3 4 5 6 7 8 9
Updated:
28 Jan 08

P
A
G
E

S
I
X


O
F

N
I
N
E