Now let's play with the new disk that we just created. The first thing you may want to do is to create a new partition. To create a new partition, we use the fdisk command followed by the disk name:
fdisk [options] device
So to create a new partition on the /dev/sdb disk; you can run the following command:
root@ubuntu-linux:~# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xb13d9b6a.
Command (m for help):
This opens up the fdisk utility. If you are unsure what to do; you can enter m for help:
Command (m for help): m
Help:
DOS (MBR)
a toggle a bootable flag
b edit nested BSD disklabel
c toggle the dos compatibility flag
Generic
d delete a partition
F list free unpartitioned space l list known partition types
n add a new...