6

I have a secondary internal HDD to store auxiliary data. I want to give it a better name. How do I do it?

3
  • 2
    I assume you want to change the label of the file system. If it's an ext file system you can use e2label <device> label or gparted if you want a GUI.
    – Marco
    Oct 12, 2013 at 21:33
  • I'd prefer to just do it with the command line. It's a FAT32 filesystem.
    – Newb
    Oct 12, 2013 at 22:11
  • Use dosfslabel <device> label.
    – Marco
    Oct 12, 2013 at 22:18

1 Answer 1

3

For FAT16 and FAT32 partitions, use mlabel from the mtools package or dosfslabel

Method 1# using dosfslabel ( As @Macro suggested )

Umount Partition

sudo umount <device>

Set Label using :

sudo dosfslabel <device> label

Method 2# using mtools

Install package using

sudo apt-get install mtools

unmount the external drive, 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>

where device name can be /dev/sdbx, you can find in sudo fdisk -l

Check the current label

sudo mlabel -i <device> -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.

Change the label

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

Reference Link

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .