Ubuntu command line formatted USB flash drive (reprint)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.