How do I change the "label" reported by lsblk? [duplicate]

Since the label is a property of the filesystem there are individual ways to set the label for different file systems.

for ext2/ext3/ext4 filesystems you use:

e2label /dev/XXX <label>

for btrfs:

btrfs filesystem label /dev/XXX <label>

for reiserfs:

reiserfstune -l <label> /dev/XXX

for jfs:

jfs_tune -L <label> /dev/XXX

for xfs:

xfs_admin -L <label> /dev/XXX

for fat/vfat (using dosfstools):

fatlabel /dev/XXX <label> 

OR (using mtools):

mlabel -i /dev/XXX ::<label>

for exfat (you might need to install exfat-utils first):

exfatlabel /dev/XXX <label>

for ntfs:

ntfslabel /dev/XXX <label>

for swap (first you need to swapoff):

swaplabel -L <label> /dev/XXX

source: https://wiki.archlinux.org/index.php/persistent_block_device_naming#by-label


The easy way is to start gparted and in the top right go to /dev/XdYand select the disk you want to edit:

enter image description here

The options are:

  1. right-click the partition you want to rename and click Label file system

    Then type the name you want the partition to have and press OK

    Repeat for the other partitions.

    Click the little green check-mark, applying all operations

If that would fail, take option 2:

This will destroy everything on the USB stick!

  1. Go to the menu Device - Create Partition Table - msdos

    This will wipe everything from the USB stick including the partitions with their silly names.

Note¹: If you would want to do this from the command line the hard way, use parted instead of gparted. ;-)
Note²: For an unmounted USB stick, that's all you need, but if you do this on a mounted internal disk, better use gparted live