5

In Linux, there is a useful fdisk command.

Is there an analogue for this in Windows? Specifically, I need to use (something like) fdisk -l.

10

There is diskpart

[start] [run] diskpart list disk

enter image description here

Also, there is wmic diskdrive. You can use that from the command line, but you probably want to apply some filters to avoid ending up with way too much information.

Availability  BytesPerSector  Capabilities  CapabilityDescriptions                 Caption                               CompressionMethod  ConfigManagerErrorCode  ConfigManagerUserConfig  CreationClassName  DefaultBlockSize  Description  DeviceID            ErrorCleared  ErrorDescription  ErrorMethodology  FirmwareRevision  Index  InstallDate  InterfaceType  LastErrorCode  Manufacturer            MaxBlockSize  MaxMediaSize  MediaLoaded  MediaType              MinBlockSize  Model                                 Name                NeedsCleaning  NumberOfMediaSupported  Partitions  PNPDeviceID                                                           PowerManagementCapabilities  PowerManagementSupported  SCSIBus  SCSILogicalUnit  SCSIPort  SCSITargetId  SectorsPerTrack  SerialNumber          Signature   Size           Status  StatusInfo  SystemCreationClassName  SystemName  TotalCylinders  TotalHeads  TotalSectors  TotalTracks  TracksPerCylinder  
              512             {3, 4}        {"Random Access", "Supports Writing"}  LSI 9750-8i    DISK SCSI Disk Device                     0                       FALSE                    Win32_DiskDrive                      Disk drive   \\.\PHYSICALDRIVE0                                                    5.08              0                   SCSI                          (Standard disk drives)                              TRUE         Fixed hard disk media                LSI 9750-8i    DISK SCSI Disk Device  \\.\PHYSICALDRIVE0                                         2           SCSI\DISK&VEN_LSI&PROD_9750-8I____DISK\5&15EE98A3&0&000000                                                                   0        0                10        0             19               L2080BGN154FA1000272  -576210269  79987195904    OK                  Win32_ComputerSystem     CORE        36707           224         156224992     8222368      224                
              512             {3, 4}        {"Random Access", "Supports Writing"}  LSI 9750-8i    DISK SCSI Disk Device                     0                       FALSE                    Win32_DiskDrive                      Disk drive   \\.\PHYSICALDRIVE1                                                    5.08              1                   SCSI                          (Standard disk drives)                              TRUE         Fixed hard disk media                LSI 9750-8i    DISK SCSI Disk Device  \\.\PHYSICALDRIVE1                                         2           SCSI\DISK&VEN_LSI&PROD_9750-8I____DISK\5&15EE98A3&0&000100                                                                   0        0                10        1             63               WQC05071864F9000A2CB              2999965248000  OK                  Win32_ComputerSystem     CORE        364725          255         5859307125    93004875     255                
              512             {3, 4}        {"Random Access", "Supports Writing"}  LSI 9750-8i    DISK SCSI Disk Device                     0                       FALSE                    Win32_DiskDrive                      Disk drive   \\.\PHYSICALDRIVE2                                                    5.08              2                   SCSI                          (Standard disk drives)                              TRUE         Fixed hard disk media                LSI 9750-8i    DISK SCSI Disk Device  \\.\PHYSICALDRIVE2                                         1           SCSI\DISK&VEN_LSI&PROD_9750-8I____DISK\5&15EE98A3&0&000200                                                                   0        0                10        2             63               P6901YFP93CC9C000C66  -900772765  144987010560   OK                  Win32_ComputerSystem     CORE        17627           255         283177755     4494885      255                
                                                                                   Generic Flash HS-COMBO USB Device                        0                       FALSE                    Win32_DiskDrive                      Disk drive   \\.\PHYSICALDRIVE3                                                    4.44              3                   USB                           (Standard disk drives)                              TRUE                                              Generic Flash HS-COMBO USB Device     \\.\PHYSICALDRIVE3                                         0           USBSTOR\DISK&VEN_GENERIC&PROD_FLASH_HS-COMBO&REV_4.44\070809103045&1                                                                                                                                                  0                          OK                  Win32_ComputerSystem     CORE                                                                             
2
  • Do you know if diskpart list disk or wmic diskdrive will perform consistency checks on the partition table like sudo fdisk -l does in Linux? – pacoverflow Nov 24 '16 at 4:07
  • I never used them on broken partitions or tested for that. – Hennes Nov 25 '16 at 9:37
2

OK, there is no doubt that diskpart is a nice tool for windows partitions, but it looks like it can only read or edit the windows local disk and its patitions, it could not recognize the disk file like MBR, recovery, or EBR1 partition file which you see in the linux filesystem; So there is really exist a tool which match fdisk a lot in Windows system, it's a cmd tool, this is its name and download website:

GPT fdisk download

and this is its picture of recognize my MBR file:

GPT fdisk screenshot

It has similar syntax with fdisk -l filename, you can use gdisk64.exe -l filename.

The download page also include its offical website, you can get more usage form it! or just use the gdisk64.exe /? in cmd for more _

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.