Go2Linux | Linux Operating System

A site dedicated to: Linux Operating System

How to format a hard disk in Linux

Date: 2009-01-17 00:00:00 -0400

To format a disk in Linux, first it should be partitioned, this how-to assumes you have already partitioned the hard drive, if you need to to partition your disk, read the how to partition a Linux disk

Linux can format in various file systems, here we will use only ext2, ext3 or swap, which are some of the most used file systems in Linux.

Lets suppose the drive you need to format is: /dev/hda1

To format it using the filesystem ext2, enter

sudo mkfs -t ext2 /dev/hda1

If it is ext3 what you want enter:

sudo mkfs -t ext3 /dev/hda1

you can also use the mkfs.ext2, mkfs.ext3 or mkswap to format directly in the file system you want.

If you liked this article please share it.

powered by TinyLetter

If you want to contact me in any other way, please use the contact page.