fatlabel
Change the label on a FAT filesystem
TLDR
Get the label of a FAT32 partition
Set the label of a FAT32 partition
SYNOPSIS
fatlabel [-v] device [newlabel]
PARAMETERS
-v, --verbose
Enable verbose output, printing details about the operation.
DESCRIPTION
The fatlabel command is a utility from the dosfstools package used to change or display the volume label (name) of a FAT12, FAT16, or FAT32 filesystem on a block device. The label is stored in the filesystem's boot sector and appears as the volume name in operating systems like Windows or when mounting the device.
To set a new label, specify the device (e.g., /dev/sdb1) followed by the desired label string (up to 11 characters). If no label is provided, fatlabel reads and prints the current label. The filesystem must be unmounted during operation to avoid corruption, as the tool directly writes to the boot sector.
This command is essential for formatting USB drives, SD cards, or legacy FAT partitions, making them easily identifiable. It supports short, uppercase-preferred labels compatible with DOS conventions. Verbose mode provides details on the operation.
CAVEATS
Filesystem must be unmounted; only supports FAT12/16/32; label limited to 11 characters; use sudo for system devices.
EXAMPLES
fatlabel /dev/sdb1 "MYDRIVE"
Sets the label of /dev/sdb1 to MYDRIVE.
fatlabel -v /dev/sdc1
Displays the current label verbosely.
NOTES
Labels are padded with spaces and null-terminated; avoid special characters for cross-platform compatibility.
HISTORY
Introduced in the dosfstools package by Roman Hodek around 1994; evolved for Linux FAT support in early kernels; current version handles VFAT extensions.


