The e2label command in Linux is used to assign or change the label of an ext2, ext3, or ext4 filesystem. The label is a user-friendly name that can be associated with a filesystem, making it easier to identify and manage partitions. The label is usually a short, descriptive text that provides information about the content or purpose of the filesystem.
The basic syntax of the e2label command is as follows:
e2label [OPTIONS] DEVICE [NEW_LABEL] .
Here,"OPTIONS"are optional flags that modify the behavior of the e2label command, device is the block device (partition) where the filesystem is located, and "NEW_LABEL" is the new label you want to assign.
Common options for the e2label command include:
# e2label /dev/sdb1 mydata ←Assign a label to a filesystem # e2label /dev/sdc1 newlabel ←Change the label of an existing filesystem # e2label -E /dev/sdd1 ←Clear the label of a filesystem |