# man > fatlabel(8)

---
type: CommandReference
command: fatlabel
mode: man
section: 8
source: man-pages
---

## Quick Reference

- `fatlabel DEVICE` — display current volume label
- `fatlabel DEVICE NEW` — set volume label to NEW (max 11 bytes, uppercase recommended)
- `fatlabel -i DEVICE` — display current volume ID
- `fatlabel -i DEVICE HEX` — set volume ID (32-bit hex, no leading 0x)
- `fatlabel -r DEVICE` — remove label (label mode) or generate new ID (volume ID mode)
- `fatlabel -c PAGE DEVICE NEW` — encode label using DOS codepage PAGE (default 850)

## Name

fatlabel — set or get MS-DOS filesystem label or volume ID

## Synopsis

**fatlabel** [_OPTIONS_] _DEVICE_ [_NEW_]

## Description

Display or change the volume label or volume ID on the MS-DOS filesystem located on _DEVICE_. By default works in label mode. Switch to volume ID mode with **-i** or **--volume-id**. If _NEW_ is omitted, the existing label or volume ID is printed to stdout. A label cannot be longer than 11 bytes and should be all uppercase for best compatibility. An empty string or label consisting only of whitespace is not allowed. A volume ID must be given as a hexadecimal number (no leading "0x") and must fit into 32 bits.

Note: FAT label is stored in two locations: boot sector and root directory. **fatlabel** reads the label only from the root directory (like MS-DOS and Windows), but changes the label in both locations. An empty label in the root directory is interpreted as no label, even if the boot sector contains a valid label.

## Options

- `-i, --volume-id` — switch to volume ID mode
- `-r, --reset` — remove label (label mode) or generate new ID (volume ID mode)
- `-c PAGE, --codepage PAGE` — use DOS codepage _PAGE_ to encode/decode label (default 850)
- `-h, --help` — display help and exit
- `-V, --version` — show version and exit

## Examples

shell
# Display current label
fatlabel /dev/sda1

# Set label
fatlabel /dev/sda1 MYVOLUME

# Display volume ID
fatlabel -i /dev/sda1

# Set volume ID
fatlabel -i /dev/sda1 1234ABCD

# Remove label
fatlabel -r /dev/sda1

# Generate new volume ID
fatlabel -i -r /dev/sda1

# Set label with specific codepage (e.g., Japanese)
fatlabel -c 932 /dev/sda1 MYVOLUME
## See Also

[**fsck.fat**(8)](http://localhost/phpMan.php/man/fsck.fat/8/markdown), [**mkfs.fat**(8)](http://localhost/phpMan.php/man/mkfs.fat/8/markdown)