Before you can use a drive in Linux, you need to partition it and create a filesystem on it.
Command | Explanation |
---|---|
sudo fdisk -l |
List all drives and their partitions. |
sudo parted /dev/nvme1n1 mklabel gpt |
Create a new GPT partition table on the drive. |
sudo parted -a optimal /dev/nvme1n1 mkpart primary ext4 0% 100% |
Create a single ext4 partition covering the whole drive. |