TestOut Linux Pro Practice Test 2025 – Complete Exam Prep Guide

Question: 1 / 400

What is the command used to format a partition after creating it?

mkfs

The command used to format a partition after creating it is `mkfs`. This command stands for "make filesystem" and is essential for preparing a partition on a disk to hold a filesystem. When you create a new partition using tools like `fdisk` or `parted`, it does not automatically format it; you must use `mkfs` to specify the filesystem type you want to use, such as ext4, NTFS, or others.

Once you execute `mkfs` followed by the appropriate options and the partition you want to format (for example, `mkfs.ext4 /dev/sdb1`), it initializes the partition with the filesystem, effectively allowing data to be stored on it.

The other commands listed serve different purposes: `fdisk` is primarily used for partitioning disks, `parted` is used for creating and managing partitions as well, and `resize2fs` is utilized for resizing ext2, ext3, or ext4 filesystems, not formatting them. Thus, `mkfs` is the correct command for the task of formatting.

Get further explanation with Examzify DeepDiveBeta

fdisk

parted

resize2fs

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy