Today we store a lot of information on our technological devices, whether they are computers, mobile phones or external disk drives. That is why it is important to know how to manage and delete the information in each of these elements..
Formatting a USB device is part of the security tasks that as users we must perform to keep data safe, eliminate viruses or recover the useful life of the USB medium.
Available file systems
There are different file systems available to set on USB media based on the operating system such as:
- Microsoft Windows: NTFS, exFAT, FAT32
- Linux: Ext2, EXT3 or EXT4
Each of these file systems has its respective properties and getFastAnswer will explain the step by step to format a USB in macOS from the terminal and not with the classic Disk Utility..
How to format a USB in macOS from the terminal
We access the disk utility to see the USB connected there:
In the utility we select the USB to see its properties:
Now we access the macOS terminal:
In the terminal we are going to list the disks using the command:
We see the properties of each of the disks, in this case the USB drive is marked as / dev / disk2.
Now, with this path in mind we are going to format the USB with the desired file system (FAT, FAT32, ExFAT, APFS), in this example the latest macOS APFS file system:
diskutil eraseDisk APFS "name" / dev / # disk
In "name" we assign the desired name to the USB.
We see that the USB formatting process begins, at the end we will see the following:
The USB will be available for use on macOS with the chosen file system:
That is how simple the process is to format a USB in macOS from the end.