Changes

How Do I: A Linux Q&A

1,108 bytes added, 22:05, 27 August 2019
/* [FORMAT FLOPPY] */
The following lines were added (+) and removed (-):
== [PARTITION AND FORMAT LINUX HARD DISK ==-------------------------------------------------------------------------------Format a hard drive / hard disk / harddrive harddisk from the linux command line.  You cannot edit the partition table if mounted. Using fdisk and knowing the disk device ID (for example we will partition a second harddrive that is /dev/sdb sudo fdisk /dev/sdbYou're in the fdisk interface, select:* press 'p' to show the partition table, do this and make sure that you are using the correct partition (remember sdb is just our example)* press 'n' to create a partition, follow prompts.  The first partition or if there is only one should be made primary.  If you press ENTER though the defaults you will create one large partition using most of the drive.  * press 'w' to write the changes to disk.  You've not created the partition until you write.Now to format the new partition.  For this example we will format as the most common linux type as of this writing (updated for ext4) sudo mkfs.ext4 /dev/sdb1Or if you wish to make a swap partition sudo mkswap /dev/sdb2
Bureaucrat, administrator
16,221
edits