System and processes
The mkfs command
Creates a filesystem on a device (format). With -t you choose the type.
Copy-ready examples
$ sudo mkfs.ext4 /dev/sdb1Format as ext4You can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- Formatting erases all data on the device.
FAQ
What does mkfs do?
It creates a filesystem on a device or partition, ready to be mounted.
Does it erase data?
Yes: it formats the device, so it wipes all its content.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course