In Linux, partition labels are used to identify partitions on a disk. They are used instead of device names like /dev/sda1 or /dev/hda1. These labels can be changed as needed, allowing for greater organization of your system through whichever naming conventions best suit your needs.
Finding the Label of a Partition
Before we change any labels, the first step is to see what our partitions are currently labelled. To find the label of a partition in a Linux system, use the following command to list each partition and its label name.
blkid -s LABEL
Changing the Label of a Partition
If you would like to assign a new label to a partition for the sake of organization and proper naming, use the following command, replacing “Main_Partition” with the label name of your choice:
sudo e2label /dev/sda Main_Partition
as you can see in the example above, we’ve checked the current labels, changed /dev/sda label to “Main_Partition” and then ran the blkid -s LABEL command again to check that the change took effect.