How To: check and change filesystem label with e2label

Перевод: Проверяем и меняем метки файловых систем с e2label

e2label in EXT e2label with ext2/ext3/ext4 filesystems

Some Linux distros (especially older ones) have preference for using filesystem labels instead of unique identifiers (UUIDs) or device names.

Long time ago there was a post here about using tune2fs for configuring filesystem label, but for ext filesystems (ext2/ext3/ext4) there’s an easier way: use e2label command.

Check ext2/ext3/ext4 Filesystem Label with e2label

Simply run e2label and specify the device name:

[email protected]:~ # e2label /dev/sda1

Set Filesystem Label with e2label

If you run the same command and specify the label, it will get assigned to the device:

[email protected]:~ # e2label /dev/sda1 rootdisk
[email protected]:~ # e2label /dev/sda1

I’ll show how to use filesystem labels in /etc/fstab tomorrow.

See Also

  • tune2fs command
  • Change filesystem label with tune2fs
  • How To: use filesystem labels in /etc/fstab
  • Free up reserved space with tune2fs

Keep Learning with Me

Follow me on Facebook and Twitter or jump into Telegram chat!:
Recommended Software
I use Brave browser, it's awesome: Brave Browser I'm also a fan of SetApp for macOS: SetApp for macOS
IT Consultancy
I'm a principal consultant with Tech Stack Solutions. I help with cloud architectrure, AWS deployments and automated management of Unix/Linux infrastructure. Get in touch!

Recent Tweets