Partition and filesystem management commands

The following commands are commonly used to repair and manage filesystems:

fdisk [device]

Manipulate or display the partition table for device using a command-driven interactive text interface. device is a physical disk such as /dev/hda, not a partition such as /dev/hda1.

mkfs device

Make a filesystem on device, which must be a partition.

mkswap device

Prepare a partition for use as swap space.

Get LPI Linux Certification in a Nutshell, 3rd Edition now with O’Reilly online learning.

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