This guide is primarily for external drives such as USB hard drives, USB flash drives, and flash memory cards. You can label internal disks, but to change their mount points, use MoveMountpointHowto which uses the file called Fstab. This guide covers editing partition labels (disk names) for FAT16/FAT32, NTFS, ext2/ext3, JFS, ReiserFS, and XFS filesystems.

By default, external drives automatically mounted at /media/disk then /media/disk-1 and so on. This is not very helpful when trying to find the drive you are looking for, especially if you have multiple devices plugged in. Labeled devices that are automatically mounted will be mounted in the /media directory using their label as the mount point, /media/<label>. ex: /media/my_external .

When choosing labels, be sure that the new mount point /media/<label> does not already exist since the directory will be created when the disk is mounted.

Using the Partition Editor

The file manager (Nautilus) currently does not support renaming disk partitions, but Gnome's Partition Editor (GParted) does. To change a partition's label, follow these directions. (Be careful using Partition Editor, as it's capable of making your computer completely unusable if you do the wrong thing.)

Open the System > Administration menu and see if there's an entry for GParted (previously Partition Editor).

Disk drives are divided up into partitions. To find the partition you want to re-label, you first have to find the disk drive that contains it, using the drop-down menu in the upper right. It will show a device name like /dev/sdb and the drive's total size in parentheses. After selecting a drive, you will see a list of all partitions on that drive.

If the partition is mounted (has a key icon next to it), right-click on the partition and select Unmount.

The label change is now pending, but has not been completed. Press the Apply button near the top of the window. After confirming, it should say "All operations successfully completed". The drive now has a new label.

Using the Command line

There are at least 6 separate command line tools used to label a partition - the program used depends on the partition's filesystem type:

Unmount the Partition

Partitions generally need to be unmounted before you can fiddle with them, so unmount the partition of the device you want to change the label for:

sudo umount <device>

ex:

sudo umount /dev/sdb1

If it was automounted, you can also unmount the drive by right clicking the desktop icon and clicking Unmount (or Eject in some cases).

Changing the Label

After you complete the appropriate porition for your filesystem, jump to the next section to verify the change.

Filesystems

FAT16 and FAT32

These filesystems are most often found on USB thumb drives, flash cards (like for a camera or cell phone), and older external USB hard drives.

Check the current label

sudo mlabel -i <device> -s ::

ex:

sudo mlabel -i /dev/sdb1 -s ::

Note that we're using the special "::" drive which allows us to specify the device descriptor on the command line; otherwise we'd have to edit ~/.mtoolsrc to assign a drive letter (see Option 2 under "Change the label").

Change the label

Option 1

After unmounting and checking the current label (above), use

sudo mlabel -i <device> ::<label>

ex:

sudo mlabel -i /dev/sdb1 ::my_external

Ignore the "Volume label is XYZ" output as this is the old label. Jump to the Verify the Change section below.