Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

disk partitioning
diskpart
command line
windows

What is DiskPart?

Anusheh Zohair Mustafeez

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

DiskPart is a disk partitioning command-line utility that is compatible with all recent versions of Windows. DiskPart has a range of useful disk operations that help to manage a computer’s drive (i.e., disks, partitions, volumes, or virtual hard disks).

widget

Running DiskPart

Press the Windows key and the “R” key together to open up a Run dialog box. Type “diskpart” into the box and click the “OK” button. Allow DisPart to make changes to your device in response to the User Account Control prompt.

widget

Listing available objects

Before running commands on DiskPart, you need to select an object on which the commands will be run. The list command is used to bring objects in focus. This command also displays a list of available objects alongside their object numbers. These list commands are:

  • list disk: Displays all disks on the machine.
  • list volume: Displays all volumes on the machine.
  • list partition: Displays all partitions on the focused disk.
  • list vdisk: Displays all virtual disks on the machine.
widget

Running DiskPart commands

Once the desired object is under focus, you can run DiskPart commands on it. Some common DiskPart commands are:

  • create <partition/volume>: Creates a partition or volume.
  • detail <disk/partition/volume/vdisk>: Displays details about the focused disk, partition, volume, or virtual disk.
  • clean: Removes all partitions or volume formatting from the disk under focus.
  • delete <disk/partition/shadows/volume>: Deletes a partition or volume.
  • exit: Exits DiskPart.

To learn more about DiskPart commands, visit the official documentation.

RELATED TAGS

disk partitioning
diskpart
command line
windows

CONTRIBUTOR

Anusheh Zohair Mustafeez
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring