Your Webhosting Questions
Answered by the Webhosting Experts

How to Find and Change the Label Name of Any Partition On a Linux Server

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

Screenshot showing the results of the blkid -s LABEL command.

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

Screenshot showing the results of the sudo e2label /dev/sda Main_Partition command.

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.

Need More Personalized Help?

If you have any further issues, questions, or would like some assistance checking on this or anything else, please reach out to us from your account and provide your server credentials within the encrypted field for the best possible security and support.

If you are unable to reach your account or if you are on the go, please reach out from your valid account email to us here at: [email protected]. We are also available to you through our phone and live chat system 24/7/365.

Tags +