Linux Tutorial: Format and Partition a USB from the Terminal

preview_player
Показать описание

In this video, I demonstrate how to format and partition a USB from the command line. Below you will find my notes to perform this task.

sudo su
fdisk -l
umount /dev/DEVICE
shred -vf -n 3 /dev/DEVICE
parted /dev/DEVICE
mktable msdos
mkpart primary 0% 100%
quit

Alternate Formats:

If you want to meet up on social media, here are my profiles:

Please visit and subscribe to my fellow Linux YouTubers:

-~-~~-~~~-~~-~-
Please watch: "Ubuntu 17.10 Linux OS Review: Gnome Shell Awesome!"
-~-~~-~~~-~~-~-
Рекомендации по теме
Комментарии
Автор

Amazing! I have looked everywhere to find a straight forward way for format a thumb drive. You'd think it would be everywhere. Thanks so much!

tomranc
Автор

Very simple and handy. Great explanation. Thanks for sharing such wonderful content on YouTube.

yugendravenkatadurgamruthk
Автор

Great Video AJ !
You should do a video where you encrypt the USB partition with LUKS.

djsensacion
Автор

Very informational video AJ. I guess to simplify things, you could have used "lsblk" or "blkid" commands instead of "fdisk -l". Also, to find out the list of commands that starts with mkfs, we could do "ls -al /sbin/mkfs*".

pnbalaji
Автор

Instead of "fdisk -l" you could do "lsblk". I find it easier to figure out which is the correct device.

bigbng
Автор

Thank you so much for showing me this.

EarnestRedwoodLINUXMASTER
Автор

Thank you so much, this tutorial helped me a lot.

dantist
Автор

I found this video on 20210120. Can you show how to make multiple (at least two) partitions on a USB drive using command line?

AViewThroughLensLens
Автор

Wow thanks you ar bizzy A.J Oh by the way ar you happy with your amd system till now i have a tip for you if you still use the fx8320 buy the Cooler Master Seidon 120V v2 here it cost 53 euros and it keeps my amd at 20 celsius also on full load

willemvandeijzen
Автор

awesome video AJ. I thought you format with just /dev/sde not sde1 becuase sde is the USB drive right i'm confused

TJWolf
Автор

On arch Linux I had to install dosfstools before mkfs recognized msdos.

MichaelMcGuire
Автор

Why is everything so unnecessarily complicated in linux ?

mapache-ehcapam
Автор

I'm getting this message when i type mktable msdos:

Warning: The existing disk label on /dev/sdb1 will be destroyed and all data on
this disk will be lost. Do you want to continue?
Yes/No? y
Error: Partition(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
58, 59, 60, 61, 62, 63, 64 on /dev/sdb1 have been written, but we have been
unable to inform the kernel of the change, probably because it/they are in use.
As a result, the old partition(s) will remain in use. You should reboot now
before making further changes.
Ignore/Cancel?

Bongestab
Автор

Hi sir can you help me with this
GNU Parted 3.2
Using /dev/sdc1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mktable msdos
Error: Input/output error during read on /dev/sdc1
Retry/Ignore/Cancel? Retry
Error: Input/output error during read on /dev/sdc1
Retry/Ignore/Cancel?

thankyou

vimalsharma