Label (command)

label is a shell command for setting the label of a volume (a.k.a. logical drive).
The command is supported for most variants of the FAT file system and for NTFS. It is available in various operating systems such as DOS, OS/2, Windows, ReactOS, DR DOS 6.0, and FreeDOS. It is available in MS-DOS versions 3.1 and later and IBM PC DOS releases 3 and later.
In modern versions of Windows, changing the label requires elevated permissions.
The current label is reported by both the dir and vol commands.
In Unix-like systems, various commands set a storage label. For instance, the command e2label is for an ext2 partition.
The command was originally designed to label floppy disks as a reminder of which one is in the disk drive. But it can be used for other types of storage media.
01Use
With no options, the command accepts a single argument may start with a drive letter (ending with a colon) and may end with label text. Without a drive letter, the command operates on the volume associated with the working directory. Without label text, the command clears the label.
For example, the command line label D:Backup sets the label of D: to "Backup".
With the /MP option, the command accepts up to two arguments: volume and label. In this case, the volume argument is treated as a mount point or a volume name. If volume name is specified, the /MP option is unnecessary.
Sources and credits
This article is adapted from the Wikipedia article “Label (command)”, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.
Images, from Wikimedia Commons:
- 5.25-floppy-front.jpg by Armedblowfish (talk|mail|contribs), BSD
Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.