![osx linein osx linein](https://venturebeat.com/wp-content/uploads/2016/03/Apple-Mac-OS-X-Tiger-Wikipedia.png)
![osx linein osx linein](https://www.howtogeek.com/wp-content/uploads/2015/02/img_54f0ce6537a1b.jpg)
Improper identification may lead to erasing the wrong disk, permanently destroying any data on it. It is absolutely critical that you use proper syntax when identifying the disk to erase. The basic syntax for erasing a disk from the command line in macOS is as follows:ĭiskutil eraseDisk FILE_SYSTEM DISK_NAME DISK_IDENTIFIERįor example, let’s say you have used “diskutil list” to show all of mounted drives on a Mac from the command line, and you have determined the appropriate drive to erase is identified as /dev/disk6s2, you want the disk name to be “Emptied” and you want the new disk file system format type to be Mac OS Extended Journaled (JHFS+), the syntax would be the following:ĭiskutil eraseDisk JHFS+ Emptied /dev/disk6s2 To erase a disk from the command line on the Mac, we’ll use the familiar “diskutil” command with the eraseDisk verb and other appropriate flags to specify options for how we want to erase the disk, and to identify which disk is to be erased. Erasing a Disk from the Command Line of Mac OS Remember the command line is unforgiving, if you are not comfortable at the command line it would be much more appropriate to erase and format a disk using Disk Utility in the standard interface of Mac OS X.
![osx linein osx linein](https://etherealmind.com/wp-content/uploads/2009/12/osx-network-location-11.png)
Do not misunderstand that, otherwise you will inevitably permanently lose data when it is erased and destroyed. The entire target disk is erased, all data on the target disk is destroyed using this approach, with no volumes or partitions or any data remaining. Notice that this is aiming to erase the entire disk from the command line here, this is not just erasing a volume or partition on the target disk. You can choose any common file system format the disk to after it has been erased, including ExFAT, FAT32, HFS+, or JHFS+.
#OSX LINEIN HOW TO#
This guide will walk through how to erase and format an entire target disk using exclusively the command line on any Mac using macOS or Mac OS X.