Writing this down because I have to look it up every damn time.
Assuming the drive is /dev/sdb
.
Unmount the Drive (if needed)
$ umount /dev/sdb1
Partition With fdisk
$ fdisk /dev/sdb
Wipe the existing file system
Command (m for help): d
Create a new primary partition using the entire disk
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-976773167, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-976773167, default 976773167):
Created a new partition 1 of type 'Linux' and of size 465.8 GiB
Write the partition and exit
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
Create an Ext4 Filesystem
mkfs.ext4 /dev/sdb
Label the disk
e2label /dev/sdb <label name>