On any Linux terminal as root
To format a hard disk partition sda1, say in Ext3 filing system, the command is
Code:
mkfs.ext3 /dev/sda1
The command doesn't change if it is for an external hard disk, a pen drive or any USB disk.
Other formatting commands for different filing systems can be seen by listing commands with starting with mk* in subdirectory /sbin
Code:
saikee@saikee-desktop-ext4:~$ ls /sbin/mk*
/sbin/mkdosfs /sbin/mkfs.cramfs /sbin/mkfs.ext4dev /sbin/mkfs.reiserfs
/sbin/mke2fs /sbin/mkfs.ext2 /sbin/mkfs.minix /sbin/mkfs.vfat
/sbin/mkfs /sbin/mkfs.ext3 /sbin/mkfs.msdos /sbin/mkreiserfs
/sbin/mkfs.bfs /sbin/mkfs.ext4 /sbin/mkfs.ntfs /sbin/mkswap
As a rule a partition should always "unmounted" using command like "umount /dev/sda1" before formatting. After formatting the partition can be read/write again if it has been mounted using commands like
Code:
mkdir /mnt/sda1
mount /dev/sda1 /mnt/sda1
A good installer always allows the owner the option to do his/her own formatting and obeys whatever partition nominated for the Linux installation. In General the first Linux needs one partition for swap and another for /. The 2nd to 150th Linux thereafter only need one partition each for the "/" but that doesn't stop users complicating it with more partitions so that they can spend more time to maintain a distro.