LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

mkdosfs

creates MS-DOS FAT filesystems

TLDR

Create FAT filesystem
$ mkdosfs [/dev/sdb1]
copy
Create FAT32
$ mkdosfs -F [32] [/dev/sdb1]
copy
Create FAT16
$ mkdosfs -F [16] [/dev/sdb1]
copy
Set volume label
$ mkdosfs -n "[LABEL]" [/dev/sdb1]
copy
Verbose output
$ mkdosfs -v [/dev/sdb1]
copy
Create a FAT filesystem in an image file
$ mkdosfs -C [disk.img] [size_in_blocks]
copy
Check for bad blocks
$ mkdosfs -c [/dev/sdb1]
copy

SYNOPSIS

mkdosfs [options] device

DESCRIPTION

mkdosfs creates MS-DOS FAT filesystems. It formats devices with FAT12, FAT16, or FAT32.The tool is also known as mkfs.fat. Used for USB drives and compatibility.

PARAMETERS

DEVICE

Block device or image file.
-F SIZE
FAT size (12, 16, or 32).
-n LABEL
Volume label.
-c
Check for bad blocks before creating filesystem.
-C
Create the file given as DEVICE and write the filesystem to it (for image files).
-I
Allow formatting the entire disk device without a partition table (superfloppy format).
-s SECTORS
Number of disk sectors per cluster (must be a power of 2).
-S SIZE
Number of bytes per logical sector (512, 1024, 2048, etc.).
-v
Verbose output.
--help
Display help information.

INSTALL

sudo apt install dosfstools
copy
sudo dnf install dosfstools
copy
sudo pacman -S dosfstools
copy
sudo apk add dosfstools
copy
sudo zypper install dosfstools
copy
brew install dosfstools
copy
nix profile install nixpkgs#dosfstools
copy

CAVEATS

Destroys existing data. Choose correct FAT type. Root required.

HISTORY

mkdosfs is part of dosfstools, providing FAT filesystem creation on Linux.

SEE ALSO

mkfs.fat(8), mkfs(8), dosfslabel(8), fatlabel(8)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid