Most Windows novices might know Diskpart as a free disk utility that helps manage some disk partitions on the computer. But do you know what commands to send to the operating system to execute specific tasks, and how to protect your data from being deleted by these Diskpart commands? Follow this guide, and you'll have a deeper understanding of what Diskpart is, what Diskpart commands can be used to manage disk drives, and even some tricks to fix Diskpart errors like a pro.
Now let's see how to use Diskpart on your computer.
Please provide the English content you want translated, and I'll do my best to translate it into Chinese.
In this article, you will learn:
As mentioned in Wikipedia, Diskpart is a newer command-line disk partitioning utility that has replaced the older fdisk. It supports all Windows users in managing disk partitions on desktops, laptops, and even external storage devices with Diskpart syntax commands.
Here is some basic information about Diskpart that you might find interesting:
Ever wondered how an operating system deals with command-line parameters and applies them to a targeted disk partition? The following is a brief overview of how Diskpart works, which will give you an idea of the tool's mechanics:
Step 1: Launch Diskpart.
Step 2. Type the following command to list available objects, such as disks, partitions, or even virtual disks:
Step 3. Choose an object to work with – a disk, volume, or partition:
Step 4. Send commands to the operating system with specific Diskpart syntax.
"Diskpart is a command-line interpreter that helps you manage the drives on your computer (disks, partitions, volumes, or virtual hard disks)." - From Microsoft.
"Diskpart is a command-line utility for partitioning hard drives, but can also format removable media such as flash drives." - From Wikipedia.
In a nutshell, Diskpart can be used to perform the following tasks:
So why is Diskpart so popular? Here's a list of its pros and cons to help you understand the benefits of this tool: Pros: 1. **Built-in Tool:** Diskpart is a command-line utility that comes bundled with Windows, eliminating the need for additional software installations. 2. **Automation:** It supports batch commands, allowing you to script disk management tasks, which is convenient for bulk operations. 3. **Advanced Features:** Diskpart offers advanced disk management functions like creating, deleting, formatting, and extending volumes. 4. **Command-Line Interface:** For users familiar with CLI, Diskpart provides a direct and precise method of operation. 5. **Remote Management:** Through Remote Server Administration Tools, Diskpart can manage disks on other computers remotely. Cons: 1. **Learning Curve:** Users unfamiliar with command lines might find Diskpart's learning curve steep, requiring knowledge of command syntax. 2. **No Graphical User Interface:** The lack of a GUI may lead to accidental misoperations, especially without confirmation prompts. 3. **Higher Risk:** Incorrect commands can result in data loss or disk damage, as its operations are typically executed immediately. 4. **Limited Error Checking:** Compared to graphical disk management tools, Diskpart offers less error checking when input mistakes occur or wrong disks are selected. 5. **Not Beginner-Friendly:** For new users not accustomed to command-line tools, Diskpart might not be the most suitable choice. After considering these pros and cons, you can decide whether Diskpart aligns with your needs and skill level.
Advantages of Disk Partitioning::
Disadvantages of Disk Partitioning::
So which command formats a volume, and which one creates a new partition? First, familiarize yourself with the Diskpart commands listed in the following table:
Disk Management Commands | Function |
---|---|
|
Get information of all disks on the computer. |
|
Get information of all partitions/volumes on a disk. |
|
Select a specific disk, partition or volume. (* stands for the selected disk or partition number). |
|
Display detailed information of the selected disk, partition or volume. |
|
Create a new primary or logical partition. (* indicates the size of the volume you want to create, in MB). |
|
Delete a specific disk, partition or volume. (* stands for the disk or partition number). |
|
Convert between basic and dynamic disks, as well as between MBR and GPT. |
|
Assign a drive letter to a new volume. |
|
Delete all partitions on a disk and remove all existing data. Or completely erase a hard drive or SSD, and clear all existing data. |
|
Format a partition or volume and change its file system to NTFS, FAT32, exFAT, etc. |
|
Set the selected partition as active. |
Note that this list contains only some common Diskpart commands. If you need to learn more advanced Diskpart commands, refer to this link provided by Microsoft for assistance: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/diskpart.
So, how to access the Diskpart utility on a Windows computer? Here are 4 ways listed below that you can follow to open Diskpart respectively according to your operating system:
After opening Diskpart, you need to manage your hard drive partitions or external storage devices with the corresponding Diskpart commands described above, following this comprehensive guide:
Here, you will get the guidelines listed below to manage disk partitions using the Diskpart command for different purposes:
This applies to creating new simple volumes, primary partitions, or logical drives.
Step 1. Open Diskpart.
Step 2: Type list disk and press Enter.
Step 3: Type select disk * and press Enter. (Replace * with the number of the disk where you want to create the partition.)
Step 4. Enter the appropriate command to create a partition on the selected disk:
Please provide the English content you want translated, and I'll do my best to translate it into Chinese.
Learn More
Aside from creating primary or logical partitions, you can also use Diskpart to create boot volume, dynamic volume, RAID-5, mirrored volume, etc. Click here to learn how to create volume with Diskpart.
Applies to: Format a hard drive/SSD, quickly format USB flash drive, or format external disk with Diskpart/CMD.
Step 1: Launch Diskpart.
If you need to format the internal hard drive, skip Step 2.
Step 2: Connect your portable external hard drive or USB to your computer.
Step 3: Type each of the following commands, pressing Enter after each one:
Note that if you need to format more than one partition on the computer, you will need to repeat this process for each one.
4. When you are finished, type exit to close the disk partition utility.
Applies to: Using Diskpart to delete a volume, remove a recovery partition, clean a disk, or erase an HDD/SSD.
Delete partitions from the hard drive:
Note: If you need to delete the recovery partition, replace delete partition with delete partition override.
Please provide the English content you want to translate, and I'll translate it into Chinese for you promptly.
Extra Tip:
If you want to quickly delete all existing partitions on the disk, please refer to the link: How to delete all partitions with Diskpart.
To clean or wipe a disk:
If you're about to erase everything on your hard drive or SSD, the Diskpart Clean command is what you need. Here's how to use it.
If you need to use the disk for another purpose, you can go back to the first guide and proceed with Creating a partition with Diskpart.
Applies to: Change the disk type using Diskpart, convert MBR to GPT or convert GPT to MBR.
Please provide the English content you want translated, and I'll promptly translate it into Chinese for you.
In addition to creating, formatting, cleaning, or converting disk partitions, you can use the Diskpart command to perform other partition tasks, such as extending, shrinking, and activating a partition.
Use Diskpart to extend the partition:
"Using Diskpart to shrink a partition"
Use Diskpart to mark the partition as active:
In addition, you can use Diskpart command line to
Though Diskpart is free for all Windows users and can solve some daily disk management issues, it's still complicated for some Windows users who have no computer skills. And the reliable AOMEI Partition Assistant Free, can totally replace it to help you accomplish various disk partitioning tasks with simple clicks.
On this page, we discuss in detail what Diskpart is, what Diskpart can do for you, the benefits of using Diskpart, and demonstrate some common Diskpart commands.
After reading this article, you will know how to use these Diskpart commands to manage disk partitions and external storage devices.
In addition, you can apply some troubleshooting fixes to get rid of normal device errors like read-only or RAW and make it work normally.
For beginners, if you don't want to use Diskpart due to the many commands you have to remember, your best bet is to use Partition Master Free. It will always save your device from fatal errors and breathe new life into your disk partitions.