Open In App

How to Format a Hard Drive Using the Command Prompt

Last Updated : 12 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Formatting a hard drive is a common step when setting up a new disk or repurposing an old one. Although there are various methods to format in Windows, using the Command Prompt offers a fast and efficient option, particularly for advanced users.

This article will show you how to format a hard drive using Command Prompt, giving you step-by-step instructions to ensure the process is done safely and effectively. Whether you're dealing with an internal HDD, an external drive, or a USB stick, formatting a hard drive in CMD is a useful skill to have.

How to Format a Hard Drive Using Command Prompt?

Find the steps below to learn how to format a hard drive using a command prompt. In the section below, we have discussed all the steps in detail.

Step 1: Open Command Prompt

Open the Command Prompt as an Administrator. Execute the 'diskpart' command in CMD. It will go inside the Disk Partition.

Command: diskpart

1--Diskpart

Step 2: Use Disk List Command

Now, let us see all the Windows Disk present on the device. Note down the Disk Number that should be formatted.

Command: list disk

2--List-Disk

Step 3: Select the Disk Number

Using the following command, select the disk that will be formatted.

Command: select disk <disk number>

3--Select-The-Disk

Step 4: Use Clean Commnad

Now, use the simple command to Quick Clean the Drive.

Command: clean

4--Execute-Clean-Command

Step 5: Create Primary Partition

Now, it is time to make the driver, the Primary Driver. It will help to reaccess the driver in the future for the OS installation process.

Command: create partition primary

5--Make-Primary-Partition

Step 6: Format the Disk

As soon as the above step is complete, the File Explorer will prompt one window. Click on the Format Disk option to complete the process.

6--Click-Format-Disk

Conclusion

Formatting a hard drive using Command Prompt is a straightforward process that gives you more control over your disk management tasks. By following the steps outlined in this guide, you can confidently format a hard drive in Windows CMD, preparing your drive for new data or wiping it clean. Whether you're troubleshooting, setting up a new drive, or simply clearing space, knowing how to format a disk using CMD is an essential tool in any Windows user's toolkit.


Next Article

Similar Reads