How to label a partition

      No Comments on How to label a partition

Labelling a partition can be quite handy, especially for partitions on usb drives that usually get auto-mounted to a folder that corresponds to their label.

Usually the label is set when the partition is created. If the label is not explicitly specified, it is usually auto-generated. To change the label, there are a couple of tools available:

ext2/ext3/ext4 partitions

You can either use e2label

# e2label device [newlabel]

or tune2fs

# tune2fs -L [newlabel] device

FAT/FAT16/FAT32 partitions

Again, there are multiple tools available, from simple perl scripts to mtools, but the easiest to use is probably dosfslabel from the dosfstools package

# yum install dosfstools
[...]
# dosfslabel device [newlabel]

NTFS partitions

ntfslabel is available as part of the ntfsprogs package

# yum install ntfsprogs
[...]
# ntfslabel device [newlabel]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.