Celeb Glow
news | March 29, 2026

Simiplified explanation of mlabel command

Can someone explanation to me the command:

sudo mlabel -i /dev/sdb1 ::my_external

I understand what the command does but what I do not understand

-i - it is not listed in the man as a option?

:: - it must be used to id a disk?

How does the sudo command use mlabel to add a label?

Another question: can I use the same command to label my primary disk running UBuntu or must I unmount the disk first? (I know Gparted needs unmount disk.)

(I use this command to label USB drives with FAT32.)

1

1 Answer

From man mtools, section Common features of all mtools commands:

The drive letter : (colon) has a special meaning. It is used to access
image files which are directly specified on the command line using the
-i options. mcopy -i my-image-file.bin ::file1 ::file2 .
This copies file1 and file2 from the image file (my-image-file.bin) to
the /tmp directory.

So, this mlabel command is applying the label my_external to the drive :, which is specified using the -i /dev/sdb1 option.

The pre-installed Disks program can change labels without unmounting disks, so it might be possible for mlabel to do so.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy