You are previewing The Linux Command Line.

The Linux Command Line

Cover of The Linux Command Line by William E. Shotts Jr. Published by No Starch Press

Creating New Filesystems

Let’s say that we want to reformat the flash drive with a Linux native filesystem, rather than the FAT32 system it has now. This involves two steps: first, (optionally) creating a new partition layout if the existing one is not to our liking, and second, creating a new, empty filesystem on the drive.


In the following exercise, we are going to format a flash drive. Use a drive that contains nothing you care about because it will be erased! Again, make absolutely sure you are specifying the correct device name for your system, not the one shown in the text. Failure to heed this warning could result in formatting (i.e., erasing) the wrong drive!

Manipulating Partitions with fdisk

The fdisk program allows us to interact ...

The best content for your career. Discover unlimited learning on demand for around $1/day.