creating an partition / formatting hd
Forum: Programming and Scripting
Topic: creating an partition / formatting hd
started by: A jerk
Posted by A jerk on Oct. 12 2005,04:19Can anyone tell me what is the *format* command in the terminal if i want to format a drive?
and also. how can i create partitions in my harddrive from my terminal?
any help is appreciated.
Posted by cbagger01 on Oct. 12 2005,22:17You need to be superuser or "root" user in order to format or manage partitions:
To edit partitions for a drive:
(where hda = primary master IDE drive, hdb=primary slave, hdc=secondary master, etc)
To format partition 1 for this drive with linux EXT2 filesystem:
mkfs -t ext2 /dev/hda1
Or to format a Linux swap partition for #2: