Before:
$ sudo fdisk /dev/sdb
[sudo] password for erw1:
Welcome to fdisk (util-linux 2.38.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): m
Help:
GPT
M enter protective/hybrid MBR
Generic
d delete a partition
F list free unpartitioned space
l list known partition types
n add a new partition
p print the partition table
t change a partition type
v verify the partition table
i print information about a partition
Misc
m print this menu
x extra functionality (experts only)
Script
I load disk layout from sfdisk script file
O dump disk layout to sfdisk script file
Save & Exit
w write table to disk and exit
q quit without saving changes
Create a new label
g create a new empty GPT partition table
G create a new empty SGI (IRIX) partition table
o create a new empty DOS partition table
s create a new empty Sun partition table
Command (m for help): F
Unpartitioned space /dev/sdb: 457.47 GiB, 491201961472 bytes, 959378831 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Start End Sectors Size
994146304 1953525134 959378831 457.5G
Command (m for help): n
Partition number (5-128, default 5):
First sector (994146304-1953525134, default 994146304):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (994146304-1953525134, default 1953523711): +5G
Created a new partition 5 of type 'Linux filesystem' and of size 5 GiB.
After: