Sometimes you may need to enlarge, shrink, or split your Ubuntu partitions. In other words, you may need to resize partition in your Linux system. In this article, we will look at how to resize partitions in Ubuntu. You can use these steps in other Linux distributions also.
How to Resize Partition in Ubuntu
Here are the steps to resize Partition in Ubuntu. We will use GParted partition editor, which ships with Ubuntu CD. It is a feature-rich graphical partition editor that can be used for all your partition related tasks.
1. Boot from Ubuntu or GParted CD
Restart your system using Ubuntu installation on a CD/USB or using Gparted disk. If you don’t have a bootable cd, download Ubuntu ISO from here and burn it to a disc.
2. Open GParted
Open GParted from Ubuntu Live environment. You can launch it from Dash
3. Resize Partition
You will see a window with all the partitions on your system.
Please note, you cannot resize a partition that is in use. So if your partition is in use, then open file manager, right click on this partition, and select Unmount option from dropdown menu to unmount it. If it is a swap partition, then select Swap off option instead.
Right-click the one you want to resize and click ‘Resize/Move’ from dropdown menu.
You will see the following window, that allows you to resize partition either by dragging the bar handles, or entering exact partition size numbers. Click Resize/Move to save changes.
Please note, your changes will be enqueued in GParted and not applied immediately.
4. Create New Partition
If you have shrunk your partition and ended up with free space on your disk due to resizing, you can create a new partition out of it. Just right click the unallocated space and click New from dropdown menu. Gparted will start the wizard for new partition creation.
Instead, you may also expand other partitions to use this unallocated space.
5. Apply changes
Click the green tick mark to apply changes in Gparted. This will take a while. Don’t switch off your system or cancel the changes midway when the operations are being applied. In case of any errors/conflicts, it will show you an error message.
6. Restart System
Restart the system, without bootable cd or USB to work with your new partitions.
In this article, we have looked at how to resize Ubuntu partitions. Please make sure you have taken a backup of all the disks you want to resize, before you perform the above operations.
How to Update Key in Python Dictionary
How to Search Items in List of Dictionaries in Python
How to Remove Multiple Items from List in Python
How to Flatten List of Dictionaries in Python
How to Flatten List of Tuples in Python