In
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, ...
,
label
is a
command
Command may refer to:
Computing
* Command (computing), a statement in a computer language
* COMMAND.COM, the default operating system shell and command-line interpreter for DOS
* Command key, a modifier key on Apple Macintosh computer keyboards
...
included with some
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
s (e.g.,
DOS,
IBM OS/2
OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 ...
,
Microsoft
Microsoft Corporation is an American multinational corporation, multinational technology company, technology corporation producing Software, computer software, consumer electronics, personal computers, and related services headquartered at th ...
Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
and
ReactOS
ReactOS is a free and open-source operating system for amd64/ i686 personal computers intended to be binary-compatible with computer programs and device drivers made for Windows Server 2003 and later versions of Windows. ReactOS has been noted ...
). It is used to create, change, or delete a
volume label on a
logical drive, such as a
hard disk
A hard disk drive (HDD), hard disk, hard drive, or fixed disk is an electro-mechanical data storage device that stores and retrieves digital data using magnetic storage with one or more rigid rapidly rotating platters coated with mag ...
partition or a
floppy disk
A floppy disk or floppy diskette (casually referred to as a floppy, or a diskette) is an obsolescent type of disk storage composed of a thin and flexible disk of a magnetic storage medium in a square or nearly square plastic enclosure lined ...
. Used without parameters,
label
changes the current volume label or deletes the existing label.
History

The command was originally designed to label floppy disks as a reminder of which one is in the machine. However, it can also be applied to other types of drive such as mapped drives.
[Label - Disk label - Windows CMD - SS64.com](_blank)
/ref>
It is available in MS-DOS
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few oper ...
versions 3.1 and later and IBM PC DOS
IBM PC DOS, an acronym for IBM Personal Computer Disk Operating System, is a discontinued disk operating system for IBM PC compatibles. It was manufactured and sold by IBM from the early 1980s into the 2000s. Developed by Microsoft, it was als ...
releases 3 and later.
It is an external command. MS-DOS 4.0x and earlier used label.com
as the external file. MS-DOS 5.0 and Windows use label.exe
as the external file. DR DOS 6.0
DR-DOS (written as DR DOS, without a hyphen, in versions up to and including 6.0) is a disk operating system for IBM PC compatibles. Upon its introduction in 1988, it was the first DOS attempting to be compatible with IBM PC DOS and MS-D ...
includes an implementation of the command. The FreeDOS
FreeDOS (formerly Free-DOS and PD-DOS) is a free software operating system for IBM PC compatible computers. It intends to provide a complete MS-DOS-compatible environment for running legacy software and supporting embedded systems.
FreeDOS ca ...
version was developed by Joe Cosentino and is licensed under the GPL.
In modern versions of Microsoft Windows, changing the disk label requires elevated permissions. The Windows dir
command displays the volume label and serial number (if it has one) as part of the directory listing.
In Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
and other Unix-like
A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
operating systems, the name of the equivalent command differs from file system
In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one lar ...
to file system. For instance, the command e2label
E, or e, is the fifth letter and the second vowel letter in the Latin alphabet, used in the modern English alphabet, the alphabets of other western European languages and others worldwide. Its name in English is ''e'' (pronounced ); plura ...
can be used for ext2 partitions.
Syntax
LABEL rive:label]
LABEL MP olumeabel
Abel ''Hábel''; ar, هابيل, Hābīl is a Biblical figure in the Book of Genesis within Abrahamic religions. He was the younger brother of Cain, and the younger son of Adam and Eve, the first couple in Biblical history. He was a shepherd ...
Arguments:
*drive:
This command-line argument specifies the drive letter of a drive.
*label
Specifies the label of the volume.
*volume
Specifies the drive letter (followed by a colon), mount point, or volume name.
Flags:
*/MP
Specifies that the volume should be treated as a mount point or volume name.
Note: If volume
name is specified, the /MP
flag is unnecessary.
Example for the command.
C:\Users\root>label D: Backup
Supported file systems
* FAT12
* FAT16
*FAT32
File Allocation Table (FAT) is a file system developed for personal computers. Originally developed in 1977 for use on floppy disks, it was adapted for use on hard disks and other devices. It is often supported for compatibility reasons by ...
* exFAT
*NTFS
New Technology File System (NTFS) is a proprietary journaling file system developed by Microsoft. Starting with Windows NT 3.1, it is the default file system of the Windows NT family. It superseded File Allocation Table (FAT) as the preferred f ...
Limitations
FAT volume labels
FAT volumes have the following limitations:
* Volume labels can contain as many as 11 character bytes and can include spaces, but no tabs. The characters are in the OEM code page of the system that created the label.
* Volume labels cannot contain the following characters: ? / \ , . , ; : + = < > "
* Volume labels are stored as upper-case regardless of whether they contain lower-case letters.
NTFS volume labels
*NTFS
New Technology File System (NTFS) is a proprietary journaling file system developed by Microsoft. Starting with Windows NT 3.1, it is the default file system of the Windows NT family. It superseded File Allocation Table (FAT) as the preferred f ...
volume labels can contain as many as 32 Unicode characters.
See also
*Vol (command)
In some operating systems, vol is a command within the command-line interpreters ( shells) such as COMMAND.COM and cmd.exe. It is used to display the volume label and volume serial number of a logical drive, such as a hard disk partition or a ...
— Displays the disk volume label and serial number.
*List of DOS commands
This article presents a list of commands used by DOS operating systems, especially as used on x86-based IBM PC compatibles (PCs). Other DOS operating systems are not part of the scope of this list.
In DOS, many standard system commands were p ...
References
Further reading
*
*
*
External links
label , Microsoft Docs
{{Windows commands
External DOS commands
OS/2 commands
ReactOS commands
Windows commands
Microcomputer software
Windows administration