How to change a USB stick name?

Hello I just bought two identical USB sticks and they both appear to have the same name in the UEFI which is annoying since I can't choose the one I need when they are both plugged in. So how to change the name of the USB stick so it appears differently in the UEFI ? Procedures for both Windows and Linux would be nice. I tried to change the name of the volume in Windows but of course it doesn't change the name detected by the UEFI after a reboot.


Solution 1:

The command "mlabel" shall help:

Linux:

First, obtain the location of your USB drive:

sudo fdisk -l

Assuming that your device location is /dev/sdb1/:

sudo mlabel -i /dev/sdb1 -s ::"LABEL HERE "

Windows:

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

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

For NTFS partitions, use ntfslabel from the ntfs-3g package.

Also:

For ext2, ext3, or ext4 partitions, use e2label.

For JFS partitions, use jfs_tune.

For ReiserFS (v3) partitions, use reiserfstune.

For XFS partitions, use xfs_admin