Skip to content

Instantly share code, notes, and snippets.

@masudcsesust04
Last active January 31, 2018 11:35
Show Gist options
  • Save masudcsesust04/a4f271ddf39c14f977e3bcfa1930099e to your computer and use it in GitHub Desktop.
Save masudcsesust04/a4f271ddf39c14f977e3bcfa1930099e to your computer and use it in GitHub Desktop.
Format pen drive or disk form command line

Format pen drive or disk form command line.

  1. Check list of disk or drives including partitions
$ lsblk
  1. Un mount drive
$ sudo umount /dev/sdbx
  1. Format USB with Extended File System(EXT)
$ sudo mkfs.ext4 /dev/sdbx
  1. Format USB with File Allocation Table(FAT)
$ sudo mkfs.vfat /dev/sdbx
  1. Format USB with New Technology File System(NTFS)
$ sudo mkfs.ntfs /dev/sdbx

Note: x = partition number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment