How to Verify & Repair Mac Disk from Command Line

How to Verify & Repair Mac Disk from Command Line.

Mac Terminal iconMac Terminal icon

The Disk Utility software on MacOS has a command line counterpart, that permits Mac customers to run disk upkeep and disk administration duties, together with verifying and repairing disks. There are apparent benefits and advantages to using the command line for duties like this, notably for troubleshooting eventualities, and distant administration, however some superior customers might also merely favor to make use of the command line slightly than the GUI app of Disk Utility.

Let’s overview how you should use the Mac command line to confirm a disk in your Mac, and restore it if obligatory.

How to Verify Volumes / Disks on Mac from Command Line

First, let’s overview how to confirm a disk quantity from the command line:

  1. First, open the Terminal software in your Mac
  2. Enter the next command to determine your disk to confirm:
  3. diskutil checklist

  4. Hit return and find the disk identifier for the disk you wish to confirm
  5. Now enter the next command to confirm the disk:
  6. diskutil verifyVolume /dev/diskID
    For instance if the amount ID to confirm is disk3s1 you’d use the next syntax:
    diskutil verifyVolume /dev/disk3s1

  7. Let diskutil full it’s process, you’ll see a message stating if all the pieces is OK with one thing alongside the strains of “The volume /dev/rdisk3s1 with UUID 28FA appears to be OK”, or if a restore is required it is going to say so

You can repeat this course of with different disks and volumes, together with exterior volumes that you simply connect with the Mac.

You may confirm all the disk and partition map by utilizing the ‘verifyDisk’ flag as an alternative of ‘verifyVolume’.

How to Repair Disks from Command Line on Mac

If the amount have to be repaired for no matter motive, you are able to do so with the next command:

diskutil repairVolume /dev/diskID

Again using the instance the place /dev/disk3s1 is the amount ID to restore, the syntax would then be:

diskutil repairVolume /dev/disk3s1

Or, if you might want to restore all the disk, you should use the ‘repairDisk’ flag as an alternative. Note that if you might want to restore all the disk, and the disk needing restore is a boot disk, you have to as well from one other drive, or from Recovery Mode, to have the ability to efficiently restore the total boot disk.

For most customers, using Disk Utility is the way in which to go, however there are various legitimate causes to wish to confirm and restore disks from the command line on a Mac. From distant administration, to troubleshooting, to mere desire, the Terminal method presents many advantages to superior customers.


Check out more article on – How-To tutorial and latest highlights on – Technical News, Apple Products