Linux refers to hard drives as either "hdx" or "sdx" where x is a letter, starting with a, which represents the order in which the drive was added to or detected by the computer. The "hd" prefix is used for IDE and PAT), and the "sd" prefix is used for SCSI, SATA, and USB drives. Usually a number is also put at the end of "hdx" or "sdx" to denote different partitions on the same phisical drive, but for the purpose of formatting you only need to know which letter the drive you want to format is.
All actions done with root privileges.
You can check which drives are represented in your system. Do following commands:
OR...ls /dev/hd*or (depending on which type of drive)
ls /dev/sd*Simple output: /dev/hda /dev/hda1 /dev/hda2 /dev/hdb /dev/hdb1 /dev/hdd
# fdisk -lOutput:
Disk /dev/hda: 80.0 GB, 80000000000 bytesIn this examples we can see that the operating system is installed on hda, which has two partitions (hda1 and hda2), and there is one partition on hdb - hdb1.
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 9726 78019672+ 8e Linux LVM
Disk /dev/hdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 1 4865 39078081 83 Linux