Partitioning disks from the command line
FDISK
Formatting and partitioning hard disk isn’t the exclusive domain of graphical tools. Shashank Sharma reveals the utilities that can make space for Linux.
OUR EXPERT
Shashank Sharma is a trial lawyer in Delhi and an avid Arch user. He’s always on the hunt for pocket friendly geeky memorabilia..
Despite the constant push for user-friendly and intuitive graphical applications over the past decade, command-line utilities remain popular for performing a vast number of tasks. Whether its cloning your disk, transferring files across the network, communicating with peers, or even accessing social media, you can do it all from the relative comfort of the Linux shell.
Partitioning the hard disk, however, is one area where many users still prefer the point-and-click convenience of graphical tools. This is mostly because of lack of familiarity and not because the tools are lacking in abilities. In the late ‘90s and early 2000s, Linux users had to contend with only command-line tools to perform partitioning. In fact, fdisk is still the default, and it’s the only partitioning tool on some Linux distributions such as Slackware.
In this tutorial we’ll discuss all the functions you might have to perform to carve space on the disk for your distribution, such as creating and deleting a partition, and more. If you’re interested in learning whether partitions can be resized from the commandline too, refer to the Resizing Partitions box (below left).