How to format a USB key

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Rescue environment

Issue

  • How to format a USB key

Resolution

plug the usb key in the computer, and check the last /dev/sd device detected :

# ls -l /dev/sd?

Here we will use /dev/sdX ; use fdisk to confirm it is the right disk :

# fdisk -l /dev/sdx

then on the partition you need to format, here /dev/sdx1 use

# mkfs -t vfat /dev/sdx1

remember to sync before unplugging the usb key

Category
Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.