Steps to format a hard disk

After we have created our partitions, the next step would be to make the partitions accessible by way of a filesystem. In Linux, when we format a partition(s), the system wipes the partition, and this enables the system to store data on the partition.

We have a number of filesystem types available in a Linux system. We use the mkfs command in combination with the desired filesystem type. To see the available filesystems, we can do this:

From the preceding screenshot, in this Ubuntu distribution, primarily the ext4 type is what the distribution is currently using. We can also use the lsblk command with the -f

Get CompTIA Linux+ Certification Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.