Windows label equivalent in Linux
Assigns a human-readable name (label) to a disk partition for easier identification.
label
e2label / tune2fs -L
e2label / tune2fs -L
e2label / tune2fs -L
Overview
What this command does
On Windows, "label" is used to set or view disk volume label. On Linux, the closest practical mapping shown here is "e2label / tune2fs -L". Assigns a human-readable name (label) to a disk partition for easier identification. This reference is grouped under System & Storage → Disk & Storage.
Windows → Linux context
What changes when you use this on Linux?
Equivalent task, different tool
Windows label maps to e2label / tune2fs -L for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.
Portable across the compared distros
The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.
For the broader concept behind this mapping, read Linux disks, storage and mounts.
Practical tasks
Common use cases
Set or view disk volume label
Assigns a human-readable name (label) to a disk partition for easier identification.
e2label /dev/sdb1
Show label (ext filesystems)
e2label /dev/sdb1 'MyDisk'
Set label on ext2/3/4
tune2fs -L 'MyDisk' /dev/sdb1
Set label (alternative)
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
lsblk -f
sudo e2label /dev/sdb1 'DataDrive'
sudo fatlabel /dev/sdb1 'MYUSB'
Walkthrough
Examples with explanations
# Windows: label D: MyDrive
# View all labels:
lsblk -f
# Set label on ext4:
sudo e2label /dev/sdb1 'DataDrive'
# Set label on FAT/USB:
sudo fatlabel /dev/sdb1 'MYUSB'
Reference
Common options and variations
| Command or option | Use |
|---|---|
e2label /dev/sdb1 | Show label (ext filesystems) |
e2label /dev/sdb1 'MyDisk' | Set label on ext2/3/4 |
tune2fs -L 'MyDisk' /dev/sdb1 | Set label (alternative) |
fatlabel /dev/sdb1 'USBDRIVE' | Set label on FAT filesystem |
lsblk -f | View all disk labels |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
Debian/Ubuntu, Fedora and Arch all use "e2label / tune2fs -L" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | e2label / tune2fs -L |
Same command on this distribution. |
| Fedora | same command | e2label / tune2fs -L |
Same command on this distribution. |
| Arch | same command | e2label / tune2fs -L |
Same command on this distribution. |
Keep learning