What is the diskutil equivalence from Disk Utility of

  • Format/Erase with Format MS-DOS(FAT) and Scheme GUID Partition Map.

  • Format/Erase with Format MS-DOS(FAT) and Scheme Master Boot Record.

In other words how do format/erase a disk with Console/Terminal?

  • 2
    The Terminal command man diskutil is your friend. Take some time to get to know the man pages
    – Allan
    Mar 16, 2020 at 20:26
  • @chepe lucho @Allan Of course, diskutil is the tool of choice. In this context it makes sense to have a look at the asr and hdiutil tools as well. If you are not familiar with man and the lesspager it makes use of by default, consider reading the documentation texts on the ss64 site, see ss64.com/osx .
    – Johnmager
    Mar 20, 2020 at 9:26

1 Answer 1


The equivalent commands are given below.

diskutil eraseDisk MS-DOS GPT diskX
diskutil eraseDisk MS-DOS MBR diskX

Where diskX is the identifier for the drive. The value of X needs to be replaced with a integer of 0 or higher. The command diskutil list will list all the current disk identifiers. The command diskutil listfilesystems will list the available formats.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .