Name USB devices to help identifying them

When I connect USB devices such as mp3 player or bike computer, they mount right away but are given names like "46A1-4000" & "6132-6635"

When I have several devices connected it gets very confusing to know which is which, especially when they have inbuilt memory & removable SD. 3 or 4 drives show with random numbers & no way to easily know what is what.

I'd like a way to name these such as "sandisc2" or "igsport" - How can I do it?


Names such as "46A1-4000" are used when the file system doesn't have a volume label. So, you just have to give it a name.

If you don't want to reformat, what I would do is use the program gparted under sudo. Try the following:

  1. Insert the USB drive.
  2. Run sudo gparted.
  3. In the top-right corner, select the USB drive in question.
  4. Presumably, it has been mounted automatically for you. Right click on the partition and select "unmount".
  5. Right click again and select "Label File System". Then, enter the name.
  6. Then, apply the change by clicking on the white checkmark on the green background.

I think you can label the file system at the time that you formatted it. For example, look at the man pages for mke2fs by typing man mke2fs. This command, which is used to make ext2/ext3/ext4 file systems takes an -L option for the volume label.

If you used some GUI to format it (i.e., even gparted, then there will be another way to label it, as well.

My suggestion above is when you don't want to re-format the file system.

Hope this helps!


Just to expand answer by @Ray, there is detailed instructions with explanations on how to do this for different cases and with different methods at Ubuntu Community Help Wiki:

RenameUSBDrive

Here is contents of this page to make an idea what it is about:

  1. Using the Partition Editor
  2. Using the Command line
    1. Identify your Partition
    2. Install the Labeling Program
    3. Unmount the Partition
    4. Changing the Label
  3. Filesystems
    1. FAT16 and FAT32
    2. NTFS
    3. ext2, ext3, and ext4
    4. JFS
    5. ReiserFS (v3)
    6. XFS
  4. Verify the Change
  5. Other Resources