Skip to content

FDISK command in Windows

The Windows fdisk command allows users to manage hard drive partitions effectively. With fdisk, users can create, delete, and format partitions on their hard drives. By using the various options and parameters available with the fdisk command, users can optimize their hard drive space and allocate it as needed. This powerful tool is essential for system administrators and advanced users who need to manage disk partitions efficiently.

FDISK Syntax:

Terminal window
fdisk [options] [parameters]

Windows FDISK Options:

OptionDescription
/statusDisplay partition information
/listDisplay a list of disk drives
/mbrCreate or repair the MBR (Master Boot Record) on disk
/infoDisplay disk partition information

FDISK Parameters:

ParameterDescription
driveSpecifies the drive letter or number of the disk
/disk: numberSelects the disk number to work with
/addAdd a new partition to the disk
/deleteDelete a partition from the disk
/setidSet the partition ID for a partition

List all available disk drives

Terminal window
fdisk -l

Displays a list of all available disk drives on the system.

Create a new DOS partition table

Terminal window
fdisk /mbr

Creates a new DOS partition table on the master boot record.

Delete a partition

Terminal window
fdisk /del 1

Deletes the partition with the number 1 on the disk.

Set the active partition

Terminal window
fdisk /activate 2

Sets the second partition as the active partition.

Display partition information

Terminal window
fdisk /info

Displays detailed information about the disk partitions.

Change the partition ID

Terminal window
fdisk /id 1 07

Changes the partition ID of partition 1 to 07.

Create a new primary partition

Terminal window
fdisk /new

Prompts to create a new primary partition on the disk.

Set the partition size

Terminal window
fdisk /size 1 100M

Sets the size of partition 1 to 100 megabytes.

How do I use fdisk in Windows?

To use the fdisk command in Windows, execute the following command:

Terminal window
fdisk --option <value>

How can I list all available disk partitions using fdisk in CMD?

To list all available disk partitions using fdisk in CMD, use the following command:

Terminal window
fdisk -l

How do I create a new partition with fdisk in Windows?

To create a new partition with fdisk in Windows, follow these steps:

Terminal window
fdisk /create partition primary

How can I format a partition using fdisk in CMD?

To format a partition using fdisk in CMD, use the following command:

Terminal window
fdisk /format fs=ntfs quick

How do I delete a partition with fdisk in Windows?

To delete a partition with fdisk in Windows, use the following command:

Terminal window
fdisk /delete partition

How can I change the active partition using fdisk in CMD?

To change the active partition using fdisk in CMD, execute the following command:

Terminal window
fdisk /set active

How do I check the current disk status with fdisk in Windows?

To check the current disk status with fdisk in Windows, use the command:

Terminal window
fdisk /status

How can I resize a partition using fdisk in CMD?

To resize a partition using fdisk in CMD, execute the following command:

Terminal window
fdisk /resize

How do I display detailed disk information with fdisk in Windows?

To display detailed disk information with fdisk in Windows, use the command:

Terminal window
fdisk /detail

Applications of the FDISK Command

  • Creating a new partition
  • Deleting a partition
  • Displaying partition information
  • Changing partition sizes
  • Setting the active partition
  • Checking disk integrity
  • Managing disk partitions