{
    "content": [
        {
            "type": "text",
            "text": "# fatlabel (man)\n\n## NAME\n\nfatlabel - set or get MS-DOS filesystem label or volume ID\n\n## SYNOPSIS\n\nfatlabel [OPTIONS] DEVICE [NEW]\n\n## DESCRIPTION\n\nfatlabel  will  display  or change the volume label or volume ID on the MS-DOS filesystem lo‐\ncated on DEVICE.  By default it works in label mode.  It can be switched to  volume  ID  mode\nwith the option -i or --volume-id.\n\n## TLDR\n\n> Get or set the label of a FAT32 partition.\n\n- Get the label of a FAT32 partition:\n  `fatlabel {{/dev/sda1}}`\n- Set the label of a FAT32 partition:\n  `fatlabel {{/dev/sdc3}} \"{{new_label}}\"`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (5 subsections)\n- **DOS CODEPAGES** (1 subsections)\n- **SEE ALSO**\n- **HOMEPAGE**\n- **AUTHORS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "fatlabel",
        "section": "",
        "mode": "man",
        "summary": "fatlabel - set or get MS-DOS filesystem label or volume ID",
        "synopsis": "fatlabel [OPTIONS] DEVICE [NEW]",
        "tldr_summary": "Get or set the label of a FAT32 partition.",
        "tldr_examples": [
            {
                "description": "Get the label of a FAT32 partition",
                "command": "fatlabel {{/dev/sda1}}"
            },
            {
                "description": "Set the label of a FAT32 partition",
                "command": "fatlabel {{/dev/sdc3}} \"{{new_label}}\""
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-i",
                "long": "--volume-id",
                "arg": null,
                "description": "Switch to volume ID mode."
            },
            {
                "flag": "-r",
                "long": "--reset",
                "arg": null,
                "description": "Remove label in label mode or generate new ID in volume ID mode."
            },
            {
                "flag": "-c",
                "long": "--codepage",
                "arg": null,
                "description": "Use DOS codepage PAGE to encode/decode label. By default codepage 850 is used."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display a help message and terminate."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Show version number and terminate. COMPATIBILITY and BUGS For historic reasons FAT label is stored in two different locations: in the boot sector and as a special volume label entry in the root directory. MS-DOS 5.00, MS-DOS 6.22, MS-DOS 7.10, Windows 98, Windows XP and also Windows 10 read FAT label only from the root directory. Absence of the volume label in the root directory is interpreted as empty or none label, even if boot sector contains some valid label. When Windows XP or Windows 10 system changes a FAT label it stores it only in the root direc‐ tory — letting boot sector unchanged. Which leads to problems when a label is removed on Windows. Old label is still stored in the boot sector but is removed from the root direc‐ tory. dosfslabel prior to the version 3.0.7 operated only with FAT labels stored in the boot sec‐ tor, completely ignoring a volume label in the root directory. dosfslabel in versions 3.0.7–3.0.15 reads FAT labels from the root directory and in case of absence, it fallbacks to a label stored in the boot sector. Change operation resulted in up‐ dating a label in the boot sector and sometimes also in the root directory due to the bug. That bug was fixed in dosfslabel version 3.0.16 and since this version dosfslabel updates la‐ bel in both location. Since version 4.2, fatlabel reads a FAT label only from the root directory (like MS-DOS and Windows systems), but changes a FAT label in both locations. In version 4.2 was fixed han‐ dling of empty labels and labels which starts with a byte 0xE5. Also in this version was added support for non-ASCII labels according to the specified DOS codepage and were added checks if a new label is valid. It is strongly suggested to not use dosfslabel prior to version 3.0.16."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "fsck.fat",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/fsck.fat/8/json"
            },
            {
                "name": "mkfs.fat",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mkfs.fat/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-i --volume-id",
                        "lines": 2,
                        "flag": "-i",
                        "long": "--volume-id"
                    },
                    {
                        "name": "-r --reset",
                        "lines": 2,
                        "flag": "-r",
                        "long": "--reset"
                    },
                    {
                        "name": "-c _ --codepage",
                        "lines": 2,
                        "flag": "-c",
                        "long": "--codepage"
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-V --version",
                        "lines": 31,
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "DOS CODEPAGES",
                "lines": 5,
                "subsections": [
                    {
                        "name": "Codepage   Language",
                        "lines": 28
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "HOMEPAGE",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 4,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "fatlabel - set or get MS-DOS filesystem label or volume ID\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "fatlabel [OPTIONS] DEVICE [NEW]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "fatlabel  will  display  or change the volume label or volume ID on the MS-DOS filesystem lo‐\ncated on DEVICE.  By default it works in label mode.  It can be switched to  volume  ID  mode\nwith the option -i or --volume-id.\n\nIf NEW is omitted, then the existing label or volume ID is written to the standard output.  A\nlabel  can't  be longer than 11 bytes and should be in all upper case for best compatibility.\nAn empty string or a label consisting only of white space is not allowed.  A volume  ID  must\nbe given as a hexadecimal number (no leading \"0x\" or similar) and must fit into 32 bits.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-i --volume-id",
                        "content": "Switch to volume ID mode.\n",
                        "flag": "-i",
                        "long": "--volume-id"
                    },
                    {
                        "name": "-r --reset",
                        "content": "Remove label in label mode or generate new ID in volume ID mode.\n",
                        "flag": "-r",
                        "long": "--reset"
                    },
                    {
                        "name": "-c _ --codepage",
                        "content": "Use DOS codepage PAGE to encode/decode label.  By default codepage 850 is used.\n",
                        "flag": "-c",
                        "long": "--codepage"
                    },
                    {
                        "name": "-h --help",
                        "content": "Display a help message and terminate.\n",
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-V --version",
                        "content": "Show version number and terminate.\n\nCOMPATIBILITY and BUGS\nFor  historic  reasons FAT label is stored in two different locations: in the boot sector and\nas a special volume label entry in the root directory.   MS-DOS  5.00,  MS-DOS  6.22,  MS-DOS\n7.10, Windows 98, Windows XP and also Windows 10 read FAT label only from the root directory.\nAbsence of the volume label in the root directory is interpreted as empty or none label, even\nif boot sector contains some valid label.\n\nWhen Windows XP or Windows 10 system changes a FAT label it stores it only in the root direc‐\ntory  —  letting  boot  sector unchanged.  Which leads to problems when a label is removed on\nWindows.  Old label is still stored in the boot sector but is removed from  the  root  direc‐\ntory.\n\ndosfslabel  prior  to the version 3.0.7 operated only with FAT labels stored in the boot sec‐\ntor, completely ignoring a volume label in the root directory.\n\ndosfslabel in versions 3.0.7–3.0.15 reads FAT labels from the root directory and in  case  of\nabsence, it fallbacks to a label stored in the boot sector.  Change operation resulted in up‐\ndating  a  label  in the boot sector and sometimes also in the root directory due to the bug.\nThat bug was fixed in dosfslabel version 3.0.16 and since this version dosfslabel updates la‐\nbel in both location.\n\nSince version 4.2, fatlabel reads a FAT label only from the root directory (like  MS-DOS  and\nWindows  systems),  but changes a FAT label in both locations.  In version 4.2 was fixed han‐\ndling of empty labels and labels which starts with a byte 0xE5.  Also  in  this  version  was\nadded  support  for  non-ASCII  labels according to the specified DOS codepage and were added\nchecks if a new label is valid.\n\nIt is strongly suggested to not use dosfslabel prior to version 3.0.16.\n",
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            "DOS CODEPAGES": {
                "content": "MS-DOS and Windows systems use DOS (OEM) codepage for encoding and decoding  FAT  label.   In\nWindows  systems DOS codepage is global for all running applications and cannot be configured\nexplicitly.  It is set implicitly by option Language for non-Unicode  programs  available  in\nRegional  and  Language Options via Control Panel.  Default DOS codepage for fatlabel is 850.\nSee following mapping table between DOS codepage and Language for non-Unicode programs:",
                "subsections": [
                    {
                        "name": "Codepage   Language",
                        "content": "437      English (India), English (Malaysia), English (Republic of the  Philippines),  Eng‐\nlish  (Singapore),  English (South Africa), English (United States), English (Zim‐\nbabwe), Filipino, Hausa, Igbo, Inuktitut, Kinyarwanda, Kiswahili, Yoruba\n720      Arabic, Dari, Persian, Urdu, Uyghur\n737      Greek\n775      Estonian, Latvian, Lithuanian\n850      Afrikaans, Alsatian, Basque, Breton, Catalan,  Corsican,  Danish,  Dutch,  English\n(Australia),  English  (Belize),  English  (Canada),  English (Caribbean), English\n(Ireland), English (Jamaica), English (New Zealand),  English  (Trinidad  and  To‐\nbago), English (United Kingdom), Faroese, Finnish, French, Frisian, Galician, Ger‐\nman,  Greenlandic,  Icelandic,  Indonesian,  Irish,  isiXhosa,  isiZulu,  Italian,\nK'iche, Lower Sorbian, Luxembourgish, Malay, Mapudungun, Mohawk, Norwegian,  Occi‐\ntan,  Portuguese,  Quechua,  Romansh,  Sami,  Scottish  Gaelic,  Sesotho sa Leboa,\nSetswana, Spanish, Swedish, Tamazight, Upper Sorbian, Welsh, Wolof\n852      Albanian, Bosnian (Latin), Croatian, Czech, Hungarian, Polish,  Romanian,  Serbian\n(Latin), Slovak, Slovenian, Turkmen\n855      Bosnian (Cyrillic), Serbian (Cyrillic)\n857      Azeri (Latin), Turkish, Uzbek (Latin)\n862      Hebrew\n866      Azeri  (Cyrillic),  Bashkir, Belarusian, Bulgarian, Kyrgyz, Macedonian, Mongolian,\nRussian, Tajik, Tatar, Ukrainian, Uzbek (Cyrillic), Yakut\n874      Thai\n932      Japanese\n936      Chinese (Simplified)\n949      Korean\n950      Chinese (Traditional)\n1258     Vietnamese\n"
                    }
                ]
            },
            "SEE ALSO": {
                "content": "fsck.fat(8), mkfs.fat(8)\n",
                "subsections": []
            },
            "HOMEPAGE": {
                "content": "The home for the dosfstools project is its \u001b]8;;https://github.com/dosfstools/dosfstools\u001b\\GitHub project page\u001b]8;;\u001b\\.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "dosfstools were written by \u001b]8;;mailto:werner.almesberger@lrc.di.epfl.ch\u001b\\Werner Almesberger\u001b]8;;\u001b\\, \u001b]8;;mailto:Roman.Hodek@informatik.uni-erlangen.de\u001b\\Roman Hodek\u001b]8;;\u001b\\, and others.  Current  maintainers\nare \u001b]8;;mailto:aeb@debian.org\u001b\\Andreas Bombe\u001b]8;;\u001b\\ and \u001b]8;;mailto:pali.rohar@gmail.com\u001b\\Pali Rohár\u001b]8;;\u001b\\.\n\ndosfstools 4.2                               2021-01-31                                  FATLABEL(8)",
                "subsections": []
            }
        }
    }
}