Ubuntu command line formatted USB flash drive
Command line: The principle is to uninstall first, then format.
If the U-disk is mounted on the/media/disk
Unloading:
sudo umount/media/disk
Formatting:
sudo mkfs.vfat/dev/sdb
You can use sudo fdisk-l to see if the U disk is/dev/sdb.
Different formats correspond to different formatting commands:
Mkfs Mkfs.cramfs mkfs.ext3 Mkfs.ext4dev mkfs.msdos mkfs.vfat
Mkfs.bfs mkfs.ext2 MKFS.EXT4 Mkfs.minix mkfs.ntfs
Example:
sudo mkfs.vfat- F/dev/sda1
Format to NTFS partition, first install Ntfsprogs
sudo apt-get InstallNtfsprogs
Then execute the format command to format the/DEV/SDA1 partition as an example:
sudo umount/dev/sda1
sudo mkfs.ntfs/dev/sda1
sudo umount/dev/sda1
sudo mkfs.ext4/dev/sda1
< Span style= "word-wrap:normal; Font-weight:bold; " >sudo Mkfs.ext3/dev/sda1
sudo mkfs.ext2/dev/sda1
Ubuntu command line formatted USB flash drive (reprint)