1

I have several USB sticks that were all made with mkfs.vfat -n FOO and I would like to re-label the filesystems without having to grab all the files on them, re-format, and put the files back on. Is there an option to mkfs.vfat I'm not seeing, or some other tool, that can do this?

1
  • 1
    Gparted can theoretically do it. This forum post suggests that if you want a mixed-case label, you have to clear it with gparted, then do sudo dosfslabel <device> <label>.
    – user55325
    Jan 8, 2014 at 3:24

2 Answers 2

4

You are looking for the mlabel program from the Mtools package.

From the manual:

The mlabel command adds a volume label to a disk. Its syntax is:

    mlabel [-vcsn] [-N serial] drive:[new_label]
    

1
  • Is drive the device node? so like mlabel /dev/sdd1:usbdrive? Oct 8, 2016 at 5:59
5

also you can do it by fatlabel

fatlabel /dev/device

gives you label

fatlabel /dev/device NEW_LABEL
1
  • Dunno why this was downvoted. fatlabel (AKA dosfslabel) is the canonical name of the tool that is provided as part of dosfstools, which also includes mkfs.fat. No need for additional packages.
    – Daniel B
    Apr 28, 2019 at 17:55

You must log in to answer this question.

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