search

Format Storage Device Linux

Wed, Jan 2, 2019 23:58 CET

Tags: Format, Storage

Very handy!

(As root)

First wipe first few bytes to avoid some unfortunate misbehaviours

dd if=/dev/zero of=/dev/sdx bs=512 count=1

Partition the disk

fdisk /dev/sdx
o
n
<enter>
<enter>
<enter>
w

Then use the format you fancy

mkfs.ext4 /dev/sdx1