Linux Commands - Add a label to a partition using the e2label command
by
Jeremy Canfield |
Updated: October 01 2023
| Linux Commands articles
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
root-partition
Did you find this article helpful?
If so, consider buying me a coffee over at