System and processes

The mkfs.ext4 command

Formats a partition with the ext4 filesystem, the Linux standard.

Syntax

mkfs.ext4 DISPOSITIVO

Most useful options

-L ETIQUETASets a label on the filesystem

Copy-ready examples

$ sudo mkfs.ext4 /dev/sdb1Format as ext4

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • Formatting erases all the partition contents: double-check the device.

Related commands

FAQ

What is a filesystem?

The structure that organises how data is stored on the disk.

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