Format Flash Drive Mac Command Line

Formatting in context of USB or Hard Drives means deleting everything from that drive and rebuilding the file system so that we can use it with an Operating System. And we usually perform formatting in our USB or External Hard Drive when we want to get rid of viruses, or we want to clean the disk as it was when we purchased it. Also when we buy a new USB or Hard Drive, it often comes with windows compatible not the mac so formatting it even needed in this case. So in this post, I will tell you “How to Format USB on Mac?”.

Formatting a Disk to MS-DOS fat32 from the Command Line in Mac OS X. Diskutil eraseDisk FAT32 DiskNameGoesHere /dev/DiskNodeIDHere. Formatting a Disk to ExFAT from the Command Line in Mac OS X. Diskutil eraseDisk ExFAT DiskName /dev/DiskNodeID. Again, any of these commands erase the entire target disk and obliterates any data on it. For those of you looking to format an entire disk and remove all partitions here is the command: diskutil eraseDisk free itsfree /dev/disk6 Even though I am formatting with free space- I still had to give it a name for the command to work, in this case itsfree. To list your disks. Diskutil list To securely erase - Needs to have a mounted volume.

How to Format USB on MAC?

If you never formatted a USB drive then don’t worry it is effortless. And here I will tell you two answers to this question that “How to Format USB on Mac?”. First, we will go with the straightforward way of doing it; then we will move to the easy way. 😉

So first, we will use the Disk Utility program, which is a GUI and very straightforward so that any kid can do it. Then in the next method, we will format USB drive from mac terminal. So let’s start.

Format USB on Mac using Disk Utility

  • Connect the USB Drive to your Mac. (This is obvious we need a USB first, then only we can format it 😛 )
  • Now we need to open Disk Utility. (Here I will give you one more tip. To open any program in your Mac just press the command + spacebar. It will start the Spotlight Search, now from here you can search for any program, but now we need Disk Utility, so search it).
  • Now, on the Disk Utility window you will see External Drives on the left.
  • Here I have my USB Drive connected, and its name is No Name. In the top we have options like First Aid, Partition, Erase, Restore, Unmount. To format the drive we need to click on the Erase Button.

Format USB on Mac

Command
  • Here, we have two options, the first one is the Name that you can set for your USB Drive. The second one is the Format. If you want to make it windows compatible you need to select MS-DOS (FAT) here. And you can also use the Mac OS Format. So its up to you what you want.
  • Now, just click on the Erase Button to complete the format.
  • And thats it. Your drive is formatted.

For formatting any External Hard Drive, we can follow the same steps.

Format USB Drive Mac using Terminal

We also have a Command Line Disk Utility interface in Mac. And we can use it to format the USB on Mac as well. Now lets see how we do this.

  • First open the terminal (Again press command + space, write terminal and hit enter).
  • In terminal now type the following command.
  • The above command will display all the disk connected with your machine.
  • Here the USB Drive that is connected, is disk2 and we will format this disk only. To format the USB drive here we will write the following command.
  • In the above command eraseDisk is the format command. Then comes JHFS+ is the Disk Type which is Mac OS Extended (Journaled). Then Belal is the name of the disk that will be assigned after formatting. Finally we are writing the name of the disk that we need to format, which disk2 is in this case. Now hit enter.
  • And the disk is formatted. 😉 Super Easy, isn’t it?

So that’s it for this tutorial friends if you got some problems then tell me in the comments. And if you think this post was useful for you, or it helped you in any way, then I request you to please SHARE it with your friends. I hope you got the answer very clearly that “How to Format USB on Mac?”. So thank you, guys. Will catch you in the next post.

For Apple Mac users, there are two ways to format USB flash drive to FAT32, including Disk Utility and Terminal command line. Refer to detailed steps of using both tools for FAT32 format. Formatting would erase data completely, make sure that you have a data backup. Otherwise, you can use data recovery software to recover data from a formatted USB drive.

Format Flash Drive Mac Command Line

Are you looking for a secure way to format USB to FAT32 on Mac? You are at the right place. Follow here, you can find two methods that will assist you in doing so on your storage device. And if you lost data during the formatting, reliable Mac file recovery software is ready to help anytime:

Workable SolutionsStep-by-step Troubleshooting
Method 1. Use Disk UtilityConnect USB to Mac > Go to Applications > Utilities > Disk Utility > Select USB and click 'Erase'...Full steps
Method 2. Use Terminal CommandConnect USB to Mac > Hit cmd + space keys > Type terminal and hit Enter...Full steps
Bonus Tip. Recover Formatted DataIf you lost data due to formatting, run EaseUS file recovery software > Scan and recover formatted data...Full steps

How to Format a USB Flash Drive with Mac to FAT32

Computer users who use a USB might have the demand for formatting it to the FAT32 file system. Compare with the other commonly used NTFS file system on a flash drive, FAT32 has a compatibility advantage across many operating systems.

It's a universal format that is compatible with Mac OS X/macOS, Windows, Linux, and DOS systems. So, if users anticipate using the flash drive with more than one operating system, they will definitely benefit from the FAT32 file system. For Apple Mac users, there are two ways to format a USB flash drive to FAT32, namely Disk Utility and Terminal command line. Below are the detailed steps of the FAT32 format with both methods.

Method 1. Format FAT32 on Mac [Disk Utility]

To format USB to FAT32 with Disk Utility will erase all data on the flash drive, so before you doing so, please do remember to check whether you have saved useful data to another secure device in advance.

To format the USB drive to FAT32, follow the next steps:

Step 1. Connect the USB flash drive to your Mac computer.

Step 2. Go to Applications >Utilities > Double click and open Disk Utility.

Step 3. Select your USB flash drive on the sidebar, choose Erase.

Step 4. Rename the USB flash drive (optional).

Step 5. Choose the format as MS-DOS (FAT) for Format, Master Boot Record for Scheme. Then click Erase.

Format Flash Drive Mac Command Line Linux

Wait for the process to complete, then you'll get an empty new USB flash drive with FAT32 as the file system. You can use it for saving data again.

Method 2. Format FAT32 on Mac [Terminal Command Line]

The command-line behavior does the same way to erase data with the Disk Utility. Again, create a backup before taking this action.

To format FAT32 on Mac with Terminal, follow the next steps:

Step 1. Connect the USB flash drive to your Mac computer.

Step 2. Hit cmd + space to run Spotlight, type: terminal, and hit Enter.

Step 3. Type: diskutil list and find out which disk is your USB drive.

Step 4. Type: sudo diskutil eraseDisk FAT32 MBRFormat /dev/disk2.

  • sudo gives you user right.
  • Diskutil calls disk utility program.
  • eraseDisk commands to format.
  • FAT32 sets the file system.
  • MBRFormat tells disk utility to format with a Master Boot Record.
  • /dev/disk2 is the location of the USB drive.

Wait for the process to complete. After this, you can type 'diskutil list' in the command again to check if the formatting has been successful.

Bonus Tip: How to Recover Data from Formatted USB

Formatting the USB would erase the data on it completely, so please make sure that you have a backup. If you don't, you can count on data recovery software to retrieve the lost data.

Mac Command Line Download

EaseUS Data Recovery Wizard has both Windows and Mac versions, so it's a good choice for data recovery, no matter you're using a PC or Mac. For Mac users, it only takes a few clicks for the software to scan and display the formatted data. To guarantee an effective data recovery without spending money to no avail, you can install the Mac data recovery free version for the first trial. You can preview all the found data before the final recovery.

To recover data from a formatted USB flash drive on Mac, follow the next steps:

Step 1. Correctly connect your USB flash drive to your Mac. Launch EaseUS Data Recovery Wizard for Mac. Start selecting the flash drive and click 'Scan' to let the software search lost files on it.

Step 2. After a quick scan and deep scan, all files will be presented in the left panel in the scan results.

Format Flash Drive Mac Command Line Download

Step 3. Select files you want to recover and click the 'Recover Now' button. Don't save the recoverable files to the USB drive itself in case of data overwriting.