返回命令列表

Linux command

e2label 命令

安全

May affect permissions or system state. Check the target first.

命令示例

Example

sudo e2label [/dev/sda1] "[label_name]"

说明

e2label changes or displays the filesystem label on an ext2/ext3/ext4 filesystem. Labels provide human-readable names for filesystems and can be used to mount filesystems by label instead of device name, which improves portability when device names change. If no label is specified, the current label is displayed. Labels are particularly useful in /etc/fstab entries, making system configuration more resilient to device renaming after hardware changes.

FAQ

What is the e2label command used for?

e2label changes or displays the filesystem label on an ext2/ext3/ext4 filesystem. Labels provide human-readable names for filesystems and can be used to mount filesystems by label instead of device name, which improves portability when device names change. If no label is specified, the current label is displayed. Labels are particularly useful in /etc/fstab entries, making system configuration more resilient to device renaming after hardware changes.

How do I run a basic e2label example?

Run `sudo e2label [/dev/sda1] "[label_name]"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.