Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
-
Locate the right disk to operate on. A few commands might help you. For example, you can use the command
ls /dev/sd*
to list all hard drives and the commandls /dev/nvme*
to list NVME (SSD) drives. Or you can simply use the commandlsblk
to list all block devices (which include all hard and solid-state disks). -
Create disk partition tables using the command
fdisk
.fdisk /dev/sdb fdisk /dev/nvme0n1
-
Format partitions to the right format (
ext4
recommended). For example, the following command formats the partition/dev/sdb3
as ext4.mkfs.ext4 /dev/sdb3 mkfs.ext4 /dev/nvme0n1p1