Edit a disk label.

      LABEL [/MP][volume] [drive:][label]

   Drive:  The drive letter of the disk to be named.
   label   The name for the volume.
   /MP     Treat the volume as a mount point or volume name.
   volume  The drive letter, mount point, or volume name.
   /?      Display help. 

Originally designed as a reminder of which floppy disk is in the machine, disk labels can also be applied to hard drives and mapped drives.

Changing the disk label requires elevated permissions. Running the LABEL command from a normal command prompt will generate the error. “Access Denied as you do not have sufficient privileges.
By default the SYSTEM account should have full access to the drive (root folder).

If you do not specify a label when you use the label command, LABEL displays a message including the "Volume Serial Number" if one exists.

A volume label can contain as many as 32 characters for NTFS volumes and as many as 11 characters for FAT volumes and can include spaces but not tabs.

FAT volume labels are not case sensitive and cannot contain any of the following characters: * ? / \ | . , ; : + = [ ] < > " This limitation does not apply to NTFS volumes.

Disk labels should not be confused with the drive description held in the registry.


To label the disk drive D: as SS64,

C:\> label d:SS64

The drive descriptor shown in Windows Explorer can also be modified with a few lines of PowerShell:

# Rename drive S: to 'Shared'
$objshell = New-Object -ComObject "Shell.Application"
$objshell.NameSpace($mapDrive).Self.Name = "Shared"



VOL - display the volume label.
Powershell: gwmi win32_logicaldisk "volumeName"
Equivalent bash command (Linux): hostname - Print or set system name.

Copyright © 1999-2019
Some rights reserved