This simple tutorial shows how to rename your disk partition in both graphical and command line ways in Ubuntu, Fedora & other Linux.
Option 1: Re-name partition via GNOME Disks
For Ubuntu, Fedora Workstation, other Linux with GNOME Desktop, and even Linux Mint, there’s a built-in tool with ability to change the partition name.
1. Firstly, search for and open “Disks” from your system app launcher or ‘Activities’ overview.
2. When the app opens, select your disk on the left, then choose the partition you want to rename. Finally, click on the gear icon to open menu and select “Edit Filesystem“.
3. Finally, in the pop-up dialog type a new name for that partition and click ‘Change’ button to apply.
You can even change the name (label) of your Linux file-system partition. It won't cause boot issue.
Option 2: Re-name partition via Gparted
In case you system does not have Gnome Disks. Gparted is another graphical application that can do the job.
Gparted is a free partition editor available in most Linux’s system repositories. It’s so popular that even some Linux use it as partition tool during installing process.
1. First, search for and install Gparted using your system package manager, such as Ubuntu Software, Gnome Software, Synaptic, etc.
2. Launch ‘Gparted’ and select your disk in top-right. Then, choose the desired partition, right-click on it and select “Label File System“.
NOTE: You need to un-mount the partition first before being able to use the option! Meaning you can’t use Gparted to re-name your Linux filesystem.
3. Next, in the pop-up dialog type the new name and click OK. Finally, remember to apply change by clicking the green check mark icon in the tool-bar.
Option 3: Rename partition via Linux command
For those familiar with Linux commands, this job can also be done by running few commands in terminal.
1. First, run command in command console to list all disk partitions:
sudo lsblk --output NAME,FSTYPE,LABEL
In the command output find out the device name and file-system type for desired partition. They are usually:
sda2, … or
sdb2, … for SATA disk partitions.
nvme1n1p2for M2 SSD partitions.
- It also output the filesystem type, such as
2. Then, depends on the file-system type, select run one of the commands below to rename it:
- For ext2, ext3, ext4 filesystem, run command to rename a partition:
sudo e2label DEVICE "Type New Name Here"
Here replace DEVICE with
/dev/nvme0n1p2, etc. So, the command can be:
sudo e2label /dev/nvme1n1p2 "Ubuntu 22.04 Updated"
- For FAT32 file system, use command:
sudo fatlabel DEVICE "Type New Name Here"
Also replace DEVICE with
- For NTFS file system, use command:
sudo ntfslabel DEVICE "Type New Name Here"
- And for extFAT, run command:
sudo exfatlabel DEVICE "Type New Name Here"
NOTE: Some commands may NOT available out-of-the-box. Install one of the package below via
sudo apt install PACKAGE_NAME command for Debian/Ubuntu, or
sudo dnf install PACKAGE_NAME for Fedora: