diskpart
外觀
![]() Windows 10中 diskpart 的截屏 | |
開發者 | Microsoft, Lee Schroeder |
---|---|
首次發布 | 2000年2月17日 |
操作系統 | Windows, ReactOS |
平台 | 跨平台 |
前任 | fdisk |
類型 | 命令 |
許可協議 | Windows: 私有軟件 商業軟件 ReactOS: GPLv2 |

diskpart
命令
diskpart
命令diskpart是一個命令行硬盤分區工具。Windows 2000和之後的Windows操作系統包含此工具。diskpart替代了fdisk。 [1][2]這個命令在ReactOS中也可用。[3]
概述
[編輯]diskpart工具可以給內部硬盤和移動存儲(比如閃存盤)分區。 從理論上來說,可以在系統安裝過程中給移動存儲分區。但實際上不行,會顯示一條消息:"Cannot format removable disk"(不能格式化可移除驅動)。微軟注意到了這個問題,並以禁用相關功能作為回應。從Vista開始,直到Windows 10。
以下命令會創建一個2GB的邏輯分區,並分配驅動器號"F:"。[4]
create partition logical size=2048 assign letter=F
可以使用這個命令查看已安裝的硬盤、它們的卷、它們的分區
list disk list volume list partition
sel
命令會選擇它們。clean
命令可以快速擦除硬盤,clean all
命令會用0填充整個分區/硬盤。
ReactOS版的diskpart由Lee Schroeder開發,使用GPLv2許可證。[5]
恢復控制台
[編輯]Windows 2000、Windows XP和Windows Server 2003包含的恢復控制台中,有一個和實際操作系統完全不同的diskpart工具。它只能添加和刪除分區,不能設置活動分區。[6]
參見
[編輯]參考資料
[編輯]- ^ diskpart. Microsoft Learn. 2023-2-4.
- ^ How to extend a data volume in Windows. Microsoft Learn. Microsoft. 2025-1-15.
- ^ Reactos/Reactos. GitHub.
- ^ Bhardwaj, Pawan K.; Andreou, Kimon; Barber, Brian; Kleiman, Dave; Satyanarayana, Mahesh. How to cheat at Windows System Administration using command line scripts
. Rockland, MA: Syngress. 2006. ISBN 1-59749-105-5.
- ^ Reactos/Reactos. GitHub. 3 January 2022.
- ^ Sayan Dutta. Partition Diskpart – Using Diskpart to create, delete, clean, or extend disk partitions. 2023-9-19.
延伸閱讀
[編輯]- Frisch, Æleen. Windows 2000 Commands Pocket Reference. O'Reilly. 2001. ISBN 978-0-596-00148-3.
- John Paul Mueller. Windows Administration at the Command Line for Windows Vista, Windows 2003, Windows XP, and Windows 2000. John Wiley & Sons. 2007. ISBN 978-0470165799.
外部連結
[編輯]
維基教科書中的相關電子教學:en:Guide to Windows Commands
- DiskPart commands. Windows Server/Windows Commands/Commands by Server Role. Microsoft. [22 January 2020].
- DiskPart.exe and managing Virtual Hard Disks (VHDs) in Windows 7. GES on Windows 7. Microsoft. 8 October 2009.