GNOME Partition Editor (GParted) is a powerful, cross-platform application that allows you to create, resize, and remove partitions on your Linux system while preserving the partition contents. The file formats it supports include btrfs, ext2, ext3, ext4, fat16, fat32, hfs+, linux-swap, lvm volumes, ntfs, and xfs. Here we show you how to create and resize partitions with GParted.
A Quick Disclaimer
Before you proceed, please back up all your important documents if you plan to test this on your primary disk. Meddling with partitions is not safe and could potentially destroy all the data on the drive. The safest way to test GParted is to grab a spare USB stick or create extra disks to attach to a Virtual Machine.
Here we demonstrate GParted on a Linux system with an additional 10 GB disk attached to it. This may be the case if you’re installing new storage in your system or if you’re using a live demo of your chosen Linux distro to partition a disk before installation.
Installing GParted
Installing GParted is very simple. It’s a mainstay tool that should be in the repositories of your chosen distro. You can install it with this command on Ubuntu:
sudo apt install gparted
With this command on Fedora/CentOS:
sudo dnf install gparted
And with this command on Arch:
sudo pacman -Sy gparted
Using a GParted Live Disk
There’s also an option to just boot to a running GParted application without having to install it on a given distro. This can be great if you’re using the data rescue features, as you can just keep a dedicated GParted USB stick around to save your data in the event of a catastrophe.
To do that, go to the GParted LiveCD download page and click “Download.” Then, choose the appropriate version for your system. For most systems you’ll be booting into, you’ll want to choose the latest version with “amd64” in the name, as that’s the architecture that will run on your laptop or desktop. From there, flash it to a USB using BalenaEtcher, and now you have a dedicated USB for managing partitions before installation and rescuing data if something goes wrong.
Creating Partitions with GParted
Since I started with a blank disk, I first have to create some partitions. Let’s assume that I’m formatting a disk on a brand new system and want to install both Windows and Linux on this system. Because it’s a completely blank disk, I’ll first have to create a partition table. For a modern disk, you’ll want to create a GPT partition table. To do that, click “Device -> Create Partition Table. .. “Click the drop-down menu and choose “gpt.” Click Apply.
Now that we have a partition table, we can go ahead and create some partitions. In this situation, I want to install Windows on the first partition and Linux on the second. So, to create our first NTFS partition, click on “Partition -> New.” That will bring up the partitioning menu.
To split a 10 GB GPT disk in half, you can give this partition 5100 MB and leave the other 5139 MB for the second partition.
From there, you can give it a name. Click “File system -> ntfs.”
Click Add. You’re done with the Windows partition.
Now, you can repeat the same process, just taking the remaining drive space for your Linux partition. You can choose whichever file system you’d like. I chose the current standard of ext4.
You’ll notice that there are a couple of different items in the bottom menu. That’s because GParted doesn’t actually write your changes to the disk until you tell it to. It’s a nice way to think about different partition schemes and layouts for your disks without actually changing anything. To make the changes permanent, click the green checkmark, then click Apply. Wait for the changes to be written to the disk, and away you go.
Resizing Partitions with GParted
Now, let’s say we want to change our partitions at some point. Maybe our Linux installation needs more space, and there’s room to shrink the Windows partition. To do that, you’ll want to click the partition you want to resize, click “Partition -> Resize/Move.” Then, choose the new size of your partition in MB. Click “Resize/Move” to complete that action.
Next, click the second partition and click “Partition -> Resize/Move/” You can set the new size according to the maximum allowed MB. I maximized the size of the partition for the sake of demonstration. You’ll get a scary message about moving your “/boot” partition or a Windows C: drive. In this case, that’s not going to happen, so it should be just fine. Check out our quick guide to Linux partitions to learn more about “/boot” partitions and partition schemes.
Now that you know how to create and resize partitions with GParted, make sure you check out some of our other Linux content, like 8 tools to easily create a custom Linux distro, how to build a new PC for Linux, and what does “chmod 777” mean?
Our latest tutorials delivered straight to your inbox