| Beginner's Guide |
Disk partitions and filesystems
A concept often new to people moving from other operating systems to Linux distributions is disk partitions. People who are accustomed to running Windows may be familiar with the idea that each disk in their computer and each thumb drive they plug into their computer is associated with a drive letter. Windows is usually installed on the C: drive, for example. If you have a second hard drive in your computer it might be labelled as the D: drive and any USB thumb drive you plug in might show up as the G: drive.
In other words, people are usually accustomed to thinking of each drive as its own separate entity with its own letter.
Disk partitions
When working on Linux we can work with whole hard drives, assigning each one a label. However, it is more common to divide a computer's disk into separate areas. Each area is called a disk partition (or simply a "partition"). Logically splitting one whole disk into separate partitions (like slicing a pie into wedges) allows us to assign different parts of the disk to different roles.
While on Windows we would normally place the operating system and all of our personal files on the same C: drive, on Linux it is customary to put the operating system (the Linux distribution) on one partition and our personal files on another partition. The area of the disk assigned to hold the operating system is called the "root" partition and is often symbolized by the "/" character. It is considered a good practice to put personal files on a second partition, often referred to as the "home" or "/home" partition.
Having our personal files separate from the operating system provides us with some extra flexibility and protection. On the one hand, if we store too many files in our home directory and it fills the partition, our data will not negatively affect or overwhelm the operating system's partition. The operating system is walled off from our data and will continue to function normally. On the other hand, if we need to upgrade or reinstall the operating system, we can wipe the root partition clean and install the operating system again without it affecting our home partition - our data remains unharmed while the operating system is wiped clean and installed fresh.
Creating disk partitions
Most of the time disk partitioning is fairly easy and usually handled by your distribution's system installer when you first set up your Linux distribution. Most installers will either offer to set up separate partitions for you or provide an easy point-and-click method to create multiple partitions on your computer's disk.
The Linux Mint install guide has a section on disk partitioning and filesystems to help you get started if you want to set up your partitions manually.
Filesystems
Earlier we talked about how Windows assigns each disk its own drive letter (such as C: and D:). On Windows, disk storage is organized a bit like a small forest of trees, each one independent from the other. On Linux distributions storage is organized like one big tree with multiple branches.
At the heart of the operating system is the root disk partition, which is associated with the directory label "/". This is the centre or core of the filesystem. Other storage disks and partitions are then attached to the main tree. For example, our personal files can be found under the home directory, located in the "/home" branch of the tree. If we plug in a thumb drive it will usually be attached to the tree under the "/media" directory.
Linux's approach might seem odd at first as it blurs the barriers between devices and treats them all as a part of a greater tree of folders and files. However, this has the benefit of making it easy to navigate more seamlessly between storage areas and to attach (or "mount") new disks and new storage devices to our storage tree.
Some Linux system installers will ask us to assign a "mount point" to each of our disk partitions. The partition we will use for our operating system will be assigned "/" as the mount point. Our personal files will be located in the "/home" directory or "mount point". It's possible to attach more partitions and disks and assign them additional places on the storage tree, but that's outside the scope of this document.
How much space is enough?
When you are creating disk partitions for a Linux distribution it can be hard to know how much space to assign to each area. Typically, I recommend around 25GB or slightly more for the root partition ("/"). The rest of the available space can be given to the "/home" directory for our personal files.
Usually 20GB to 25GB is more than enough space for the basic operating system, some extra applications, and development tools. (As I type this, my system with all of its applications, games, and development tools is 21GB.) However, if you think you will need a lot of applications, there is no harm to assigning more space to your operating system, perhaps up to around 50GB. Beyond that is probably not practical.
A note on swap
In the past it was common for people to create a third partition, known as a "swap partition". This was a special partition set aside to temporary hold information which could not fit into the computer's memory. It was like an overflow area for large programs. A swap partition was typically at least the size of the computer's memory, sometimes larger.
These days most computers have more than enough memory to run Linux and its applications so a swap partition usually is not needed. Also, most modern distributions will create what is called a "swap file". A swap file performs the same duty as a swap partition - it is a file on your root partition which holds temporary data when memory gets full. This swap file is created for you at install time and catches any overflow from memory. This means you don't need to create a swap partition or worry about how big it should be, your distribution likely handles all of that automatically for you.
* * * * *
• Table of Contents
|
|
| TUXEDO |

TUXEDO Computers - Linux Hardware in a tailor made suite Choose from a wide range of laptops and PCs in various sizes and shapes at TUXEDOComputers.com. Every machine comes pre-installed and ready-to-run with Linux. Full 24 months of warranty and lifetime support included!
Learn more about our full service package and all benefits from buying at TUXEDO.
|
| Star Labs |

Star Labs - Laptops built for Linux.
View our range including the highly anticipated StarFighter. Available with coreboot open-source firmware and a choice of Ubuntu, elementary, Manjaro and more. Visit Star Labs for information, to buy and get support.
|
|