Fdisk format ext4

sudo fdisk /dev/sda; Use the following commands shortcuts in fdisk: Create a new partition table: g (for GPT, use help for other format) Create a new partition: n You can keep the default values for a single partition; Confirm with Y to remove the signature; And finally write and exit fdisk: w; When you run fdisk -l again, you’ll see a new partition