How to format a hard drive in Linux

posted: Thursday 31 December 2009 by Tavis J. Hampton in: Web Hosting VPS & Dedicated Web servers

Tux, Linux mascotWhen you lease a remote managed or even unmanaged server, you do not typically have to concern yourself with formatting hard drives. Still, it is a good skill to learn, and if you find yourself in a situation where you are building your own web hosting server, it is a very useful skill to have. For desktop Linux, there are plenty of graphical tools for formatting, but on a server, you will have to dig your hands into the soil of the command line. Follow these easy steps:

1. Find the name of your hard drive:

# fdisk -l | grep '^Disk'

It will give you a list of the available disks. Make sure you choose the right one:

Disk /dev/sda: 251.0 GB, 251000193024 bytes
Disk /dev/sdb: 251.0 GB, 251000193024 bytes

2. Create at least one disk partition:

# fdisk /dev/sdb

For more information about hard disk partitioning, see this guide.

3. Format the hard drive. For this you actually use the mkfs (make filesystem) command:

# mkfs.ext3 /dev/sdb1

(Ext3 is a filesystem type. You can use others, such as vfat)

Read the rest of the steps, including mounting your new system at nixCraft.

1 stelle2 stelle3 stelle4 stelle5 stelle (no votes)
share this 0 comments

Related posts

Server OS Tips del 30 Jul 2010
Server Backup Tips del 30 Jul 2010
Server Hardware Tips del 28 Jul 2010
Server Maintenance Tips del 28 Jul 2010

Related tags

Be the first to add a comment to this article.

Your email address is required but won't be displayed.
Leave a comment

Register to reserve your nickname accross all the blogs in the Blogo network and to upload your avatar. If you already are registered, login to user your nickname.

Yes No

Comment preview

Network Blogo