​Making Linux partitions is one of the toughest tasks for new Linux users. In this article, I will cover various topics on Linux partitioning. I’ll use different Linux partition managers to list, create, resize, extend and delete Linux partitions.

In this article, we will perform CRUD(Create or Clone, Read, Delete, Update) actions on system storage drive using various Linux partition managers. If you are a new Linux user, you might want to try an easy to use GUI based tool. If you like tinkering through Command line then we’ll also cover 4 cli-based partition managers.​I hope you find this article helpful. If at any point, you find something confusing, let me know in the comment section below this article. I will reply ASAP.​GUI based toolsGpartedList partitionsCreate partitionsResize partitionsDelete partitionsCLI based toolscfdiskList partitionsCreate partitionsResize partitionsDelete partitionsfdiskList partitionsCreate partitions​Delete partitions

Gparted is the most popular and powerful partition manager for Linux. You can easily perform CRUD on your storage drives.​Listing partitions in Gparted is nothing more than opening the app itself. It takes a few seconds to load all the system drives and partitions.

​cfdisk and an extremely easy to use tool for managing partitions. It is cli based but provides easy to use options to perform actions on your system drives.​

Just open the app and it’ll list out all the partitions of the current storage drive.

To list partitions in fdisk, use the ‘l’ argument with fdisk.

Creating a partition using Gparted is extremely easy and quick in Linux. Simply select the drive you want to create partition from, right click and click ‘New’. Make sure to unmount the drive otherwise ‘New’ option will be greyed out.​Enter the new partition size and hit ‘Add’ button.

​Click apply to start creating the partition.

To create a new partition using cfdisk, run cfdisk with sudo permission.​

Select Free space you want to create a partition of. Select ‘New’ and hit enter.

Enter the partition size and hit enter. By default, it creates the partition of all free space. So just pause before you hit enter and see if you really want to create partition out of all free space.

Everything is setup. Now select ‘Write’ and hit enter. It will ask you to type ‘yes’ and hit enter. This is the last confirmation, after this prompt, cfdisk will create the partition.

That’s it. Partition created!

To create Linux partition using fdisk, first list partitions and note down the device path you want to create the partition from.

For this tutorial, I want to create a new partition from /dev/sda3. Then select the partition using fdisk command –

To create a new partition use ‘n’ command.

Select partition type. To create a primary partition, use ‘p’ command and ‘e’ for extended type.

Next, it will ask for partition number. Leave it default which is 1. Hit enter.

Then select the size of your new partition. The first sector, select default value, and Last sector enter the value in M. For example, to create a 2GB partition, type +2000M.At last, it’ll read the message as follows – ‘​Created a new partition 1 of type ‘Linux’ and of size 2 GiB. ‘But the partition is still not created. To write changes to disk, use ‘w’ command. It’ll show the following message – “The kernel still uses the old partitions. The new table will be used at the next reboot. Syncing disks.”​For the new partition to appear, you’ll need to reboot your system.

Resizing partition in Gparted is very simple. Open the app, select the partition you want to resize, right-click and select ‘Resize/Move’.

Enter the new partition size and hit ‘Resize/Move’ button. Lastly, click the apply button to apply the changes you have just made.

Start cfdisk with sudo permission.

Select the partition you want to resize. Select ‘Resize’ option and hit enter.

Enter the new partition size.

And finally, write changes to disk by selecting write option.

To delete a partition in Linux using GParted, simply select the partition, right-click and select delete option to delete the partition.

Do not forget to apply changes after deleting the partition.

To delete the partition using cfdisk, start cfdisk with sudo.

Highlight the partition you want to delete and select ‘Delete’ option.

And finally, write changes to disk by selecting ‘Write’ option.

To delete a partition using fdisk, first, run fdisk and select the partition to be deleted.

Then use ‘d’ command to delete the selected partition.

And after it’s deleted you can create a new partition by using ‘n’ command and finally write all the changes to the disk by passing ‘w’ command.

So that was all for now on how to manage Linux partitions. In this article, we taught you listing Linux partitions, creating Linux partitions, resizing partitions and deleting partitions using three main partition management tools in Linux.​I will keep updating articles with more commands and options. As I said above, if you have any question, drop it in the comment section below this article. I will try my best to cover that as well in this article.

GUI based toolsGpartedList partitionsCreate partitionsResize partitionsDelete partitionsCLI based toolscfdiskList partitionsCreate partitionsResize partitionsDelete partitionsfdiskList partitionsCreate partitions​Delete partitions

Disk /dev/sda: 30.1 GiB, 32365232128 bytes, 63213344 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xa51a596a Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 19531775 19529728 9.3G 83 Linux /dev/sda2 19533822 50782207 31248386 14.9G 5 Extended /dev/sda3 50782208 63213343 12431136 5.9G 83 Linux /dev/sda5 19533824 27344895 7811072 3.7G 82 Linux swap / Solaris /dev/sda6 27346944 50782207 23435264 11.2G 83 Linux Partition table entries are not in disk order.

Welcome to fdisk (util-linux 2.31.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Device does not contain a recognized partition table. Created a new DOS disklabel with disk identifier 0x64d7e7ab. Command (m for help):

Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p):

Partition number (1-4, default 1):

But the partition is still not created. To write changes to disk, use ‘w’ command. It’ll show the following message – “The kernel still uses the old partitions. The new table will be used at the next reboot. Syncing disks.”​For the new partition to appear, you’ll need to reboot your system.

Welcome to fdisk (util-linux 2.31.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help):