Today, in this article we will discuss about how to Verify and Repair Disk From OS Command Line. The Disc Utility app is a powerful tool for keeping all of the drives attached to your Mac in good shape. But there are times when it might not be an option. As an example, using SSH to connect to a faraway computer or Disc Utility that just won’t start.
The Disc Utility app that comes with MacOS has a command line version that lets advanced users do disc upkeep from the terminal, such as verifying and fixing discs. This gives you a lot of helpful troubleshooting options, like the ability to fix the disc directly through SSH or Single User Mode if you can’t get into the user accounts.
The Utilities area in OS has a very nice graphical user interface that lets you check and fix your hard drive. It’s called Disc Utility, and it can be your first line of defense when strange things happen to the hard drive on your Mac. If you want to know more information about this Visit Official Apple Support site.
How to Verify and Repair Disk From OS Command Line
Verifying Disks in Mac Terminal
Now that you know what discs are hooked up to your Mac, you can start checking them. You can target more than one drive at once if you know what their names are.
- In the Terminal, type the command in this format:
diskutil verifyVolume [drive name]
- If you want to verify or repair your main drive, you can simply use “/” as the drive name. So, type or paste the following:
diskutil verifyVolume /
Repairing Disks in Mac Terminal
- To repair a disk in the terminal, you will also need to type a particular command, which takes the following format:
diskutil repairvolume /Volumes/[drive name]/
- For example, the external hard drive “Backup” was the one detected as corrupted, type in the following:
diskutil repairvolumne /Volumes/Backup/
- The Terminal will now run a repair routine. All you have to do is wait for the dialog to finish. You will know the repair is already finished when you see this line:
Finished file system repair on disk1s1 [drive name]
Verifying and Repairing Disk Errors Automatically
In addition to the Disc Utility and Terminal, you can also use programmes like Outbyte macAries to check your Mac’s discs for mistakes and fix them if they are found. But are already a lot of ways to find and fix problems on your Mac, it’s still a good idea to learn how to fix problems the old-fashioned way. One day or another, this information might come in handy.
What is Mac Terminal?
Before we get into the technical details of how to check HDD on Mac or how to fix discs in OS using the Terminal, let’s talk about what the Terminal is. The Terminal is one of the most confusing tools that Mac users can use. If you’ve seen it before, you might have thought why you’d want to run it when you can just use other automated utilities.
As was said above, there will be times when you need to use the Terminal to do troubleshooting jobs by hand. You can also change some parts of your Mac if you know how to use certain programmes and do so. What you need to know about the Terminal is that it is just another programme. It starts up just like any other programme. Once you start it up, you’ll see Apple’s version of the command-line environment. At this point, you can do whatever you need to do.