Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

How do I format a disk partition from the command line on Mac OS X?

In case someone wonders why: because for some people Disk Utility fails.

share|improve this question
1  
Another reason you might want to do this: you don't have GUI access to the box. –  Michael Dec 28 '12 at 3:09
add comment

1 Answer

up vote 6 down vote accepted

diskutil list

In my case I wanted to format the parition as NTFS for installing Windows 7 on it. The last parameter is the partition 4 on first disk.

diskutil eraseVolume "Tuxera NTFS" my-ntfs disk0s4

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.