mkfs.ext4 -L data -m 0 /dev/sdb1

Category: Administration

mkfs.ext4 -L data -m 0 /dev/sdb1

Create an ext4 filesystem with a label

Formats /dev/sdb1 as ext4 with the label data and no reserved blocks, since -m 0 sets the reserved percentage to zero. Formatting destroys everything on the device, so double-check the target before running. Use the label with mount -L or in fstab by LABEL=data.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.