Add a label to a partition in Linux

Home > Search

The e2label command followed by a partition displays the current label of a partition. In this example, the /dev/sda1 partition does not have a label.

~]# e2label /dev/sda1


The e2label command followed by a partition and a label name adds or updates a label for a partition. In my this, the /dev/sda1 partition is labeled "root-partition".

~]# e2label /dev/sda1 root-partition


Now that /dev/sda1 has a label, the e2label command followed by the partition name displays the label of the partition.

~]# e2label /dev/sda1


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter in the box below so that we can be sure you are a human.