mkfs
Linux · System · available in the simulator
What it does
Build a Linux filesystem on a device.
Syntax
mkfs -t tipo dispositivo
Options and parameters
-t TIPOfilesystem type (ext4, vfat, ntfs...)
mkfs.TIPOshortcut for each filesystem type
-tFilesystem type to create.
sudo mkfs -t ext4 /dev/sdb1-LSet the volume label for the new filesystem.
-nSimulate the operation without writing to the disk.
Usage examples
sudo mkfs.ext4 /dev/sdb1sudo mkfs.vfat /dev/sdb1sudo mkfs -t ntfs /dev/sdb1mkfs -t ext4 /dev/sdb1sudo mkfs -t ext4 /dev/sdb1
Notes and common mistakes
- Formatting completely erases the data on the device.