Forrest logo
tool overview
On this page you find all important commands for the CLI tool mkfs.fat. If the command you are looking for is missing please ask our AI.

mkfs.fat

The mkfs.fat command line tool is used to create a File Allocation Table (FAT) file system on a storage device. It is mainly used for creating FAT16 or FAT32 file systems, which are compatible with various operating systems such as Windows and Linux. This tool is part of the dosfstools package and is commonly found on Linux distributions.

With mkfs.fat, you can specify the block size, file system type, and other parameters during the creation of the file system. It supports long file names (LFN) and can handle various file attributes like read-only, archive, hidden, and system. The tool also provides options for setting the volume label, cluster size, and formatting a specific range of sectors. Additionally, it can check and repair FAT file systems with the -v or -a options.

It is important to note that mkfs.fat performs the actual formatting of the file system, so extreme caution must be taken while using this command as it irreversibly erases existing data on the storage device. Therefore, it is advisable to back up important data before using this tool.

List of commands for mkfs.fat:

  • mkfs.fat:tldr:8e0d3 mkfs.fat: Create filesystem with a volume-name.
    $ mkfs.fat -n ${volume_name} ${-dev-sdb1}
    try on your machine
    explain this command
  • mkfs.fat:tldr:db074 mkfs.fat: Create a fat filesystem inside partition 1 on device b (`sdb1`).
    $ mkfs.fat ${-dev-sdb1}
    try on your machine
    explain this command
  • mkfs.fat:tldr:f4e1f mkfs.fat: Use 5 instead of 2 file allocation tables.
    $ mkfs.fat -f 5 ${-dev-sdb1}
    try on your machine
    explain this command
  • mkfs.fat:tldr:f508c mkfs.fat: Create filesystem with a volume-id.
    $ mkfs.fat -i ${volume_id} ${-dev-sdb1}
    try on your machine
    explain this command
tool overview