Forrest logo
back to the mkfs.fat tool

mkfs.fat:tldr:8e0d3

mkfs.fat: Create filesystem with a volume-name.
$ mkfs.fat -n ${volume_name} ${-dev-sdb1}
try on your machine

The command mkfs.fat -n ${volume_name} ${-dev-sdb1} is used to create a FAT (File Allocation Table) file system on a specified device. Let's break down each part of the command:

  • mkfs.fat: This is the command for creating a FAT file system. It is used to format a storage device, such as a USB drive or an SD card, with the FAT file system.

  • -n ${volume_name}: The "-n" flag is used to specify the volume name for the file system. ${volume_name} is a placeholder for the desired volume name, which you can replace with any name you like. This name will be associated with the file system.

  • ${-dev-sdb1}: This is the device name or path of the storage device where the FAT file system will be created. The example provided is sdb1, but the actual device name may vary depending on your system. The "-dev-" part indicates it is a device, and "-sdb1" is the specific device name or path.

Overall, the command mkfs.fat -n ${volume_name} ${-dev-sdb1} will format the specified device with a FAT file system and assign it a volume name.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the mkfs.fat tool