diskpart命令_Windows Diskpart命令教程
diskpart命令
diskpart
is a Windows utility to create partitions on the disk. It is similar to the Linux fdisk utility. diskpart provides an interactive command shell where we will enter related commands to partition, format disk, and volumes. In order to run diskpart we need Administrator privileges. The best way to get Administrator privilege is opening MS-DOS as Administrator by right-clicking on it.
diskpart
是Windows实用程序,用于在磁盘上创建分区。 它类似于Linux fdisk实用程序。 diskpart提供了一个交互式命令外壳,我们将在其中输入相关命令来分区,格式化磁盘和卷。 为了运行diskpart,我们需要管理员权限。 获得管理员特权的最佳方法是通过右键单击以管理员身份打开MS-DOS。
diskpart命令交互模式 (diskpart Command Interactive Mode)
diskpart
is mainly used by its interactive shell. So we should enter this shell with the diskpart
command. All commands issued bellow are used in interactive diskpart
shell.
diskpart
主要由其交互式外壳使用。 因此,我们应该使用diskpart
命令输入此shell。 下面发布的所有命令都在交互式diskpart
shell中使用。
> diskpart
diskpart命令帮助(diskpart Command Help)
There are a lot of command supported by diskpart
. We can list these commands with help
diskpart
支持很多命令。 我们可以在help
这些命令
> help
列出磁盘和分区(List Disk and Partitions)
First we need to know how many disk there are. We will use list disk
command for this. We will also get following information about disks.
首先,我们需要知道有多少个磁盘。 我们将为此使用list disk
命令。 我们还将获得有关磁盘的以下信息。
- Status状态
- Size尺寸
- Free自由
- GPTGPT
> list disk
选择要格式化的磁盘(Select Disk To Format)
Now we will select the second disk which is numbered as 1. Because disk numbers start from 0. We will use select disk 1
. In order to execute format commands, we should select a disk.
现在,我们将选择第二个磁盘,编号为1。因为磁盘号从0开始。我们将使用select disk 1
。 为了执行格式化命令,我们应该选择一个磁盘。
> select disk 1
清理驱动器分区表和信息(Clean Drive Partition Table and Information)
If there is an already set configuration we should clear them to make things simple. We will use clean
command.
如果已经设置好配置,我们应该清除它们以简化操作。 我们将使用clean
命令。
> clean
检查磁盘选择(Check Disk Selection)
In order to execute commands to format disk we should select the disk and partition. We have already selected disk but we can check this selection with list disk
command too. Selected disk will have asterisk before its name.
为了执行格式化磁盘的命令,我们应该选择磁盘和分区。 我们已经选择了磁盘,但是我们也可以使用list disk
命令检查此选择。 所选磁盘的名称前将带有星号。
> list disk
创建新的分区表(Create New Partition Table)
We will create a partition on the selected disk. We will issue create partition primary. There are primary and secondary partition types. IF we have less than 5 partitions in a disk we can use primarily for all of them.
我们将在所选磁盘上创建一个分区。 我们将发布create partition primary。 有主分区和辅助分区类型。 如果磁盘中的分区少于5个,则可以将其主要用于所有分区。
> create partition primary
列出现有分区表和信息(List Existing Partition Table and Information)
Now we can list partition we have already created. We will use list partition
command for this. Also following information about partition will be listed
现在我们可以列出已经创建的分区。 我们将为此使用list partition
命令。 此外,还将列出有关分区的以下信息
- Partition name分区名称
- Partition Type分区类型
- Szie西耶
- Offset抵消
> list partition
选择要修改的分区(Select Partition To Modify)
In order to operate on the given partition, we should select the partition with the select partition
command. This will select selected disks given partition according to number.
为了对给定的分区进行操作,我们应该使用select partition
命令选择该分区。 这将根据编号选择给定分区的选定磁盘。
> select partition 1
激活分区(Activate Partition)
In order to use partition we will activate it. We will use active
command.
为了使用分区,我们将激活它。 我们将使用active
命令。
> active
格式化分区(Format Partition)
This is one of the most important part. We will format the selected and activated partition. We will use format
command. Also, we will specify the file system type with the FS option. label option is used to set the name of partition which is shown to the user. quick specifies the format operation speed. In this example, we set file system type NTFS
and label D
这是最重要的部分之一。 我们将格式化选定并激活的分区。 我们将使用format
命令。 另外,我们将使用FS选项指定文件系统类型。 标签选项用于设置显示给用户的分区名称。 quick指定格式操作速度。 在此示例中,我们设置文件系统类型为NTFS
,标签为D
> format FS=NTFS label=D quick
分配字母(Assign Letter)
In order to use the partition, we should assign a letter to the formatted partition. We will use assign
command with letter
option. In this example, we assign letter E
to the partition.
为了使用分区,我们应该为格式化的分区分配一个字母。 我们将使用带letter
选项的assign
命令。 在此示例中,我们为分区分配字母E
> assign letter=E
We can see from screenshot that we have tried to assign D
previously which is already assigned. This produced error and operation is not completed.
从屏幕截图中可以看到,我们已经尝试分配先前已分配的D
产生的错误和操作未完成。
从Diskpart Interactive Shell退出(Exit From Diskpart Interactive Shell)
We can exit from the diskpart
interactive shell with exit
command like below.
我们可以使用如下的exit
命令从diskpart
交互式shell中exit
。
> exit
翻译自: https://www.poftut.com/windows-diskpart-command-tutorial-examples-format-disk/
diskpart命令
diskpart命令_Windows Diskpart命令教程相关推荐
- 昊鼎王五:Windows运行中的所有命令_Windows快捷命令_运行中的所有命令
昊鼎王五:Windows运行中的所有命令_Windows快捷命令_"运行"中的所有命令 winver 检查Windows版本 wmimgmt.msc 打开Windows管理体系结构 ...
- tracert命令_Windows Tracert命令教程
tracert命令 Windows operating system provides some basic tools to troubleshoot the network. tracert is ...
- bat 命令返回结果_bat教程[284] unzip解压
古树屋Click to follow us (1)unzip命令的简介 C:\Users\86137\Desktop>unzip -hUnZip 6.00 of 20 April 2009, b ...
- 区块链教程Fabric1.0源代码分析Peer peer channel命令及子命令实现
区块链教程Fabric1.0源代码分析Peer peer channel命令及子命令实现,2018年下半年,区块链行业正逐渐褪去发展之初的浮躁.回归理性,表面上看相关人才需求与身价似乎正在回落.但事实 ...
- linux sed p变量,Linux sed 命令详解系列教程之各种问题解决
本文目录: 1 sed中使用变量和变量替换的问题 2 反向引用失效问题 3 "-i"选项的文件保存问题 4 贪婪匹配问题 5 sed命令"a"和"N& ...
- 启动mysql55命令_mysql服务的启动和停止登陆mysql增加新用命令和方法实例教程
mysql服务的启动和停止登陆mysql增加新用命令和方法实例教程,mysql常见常用操作命令汇总总结,增删查改命令,启动用户管理,数据库管理等. mysql服务的启动和停止 net stop mys ...
- find基础命令与提权教程
find基础命令与提权教程 find命令用来在指定目录下查找文件,若不指定目录则视为当前目录 find常用参数 语法:find [path-] [expression] path为查找路径,.为当前路 ...
- cad角度命令怎么输入_CAD教程 | CAD大佬也是这样过来的,制图命令的输入方法及操步骤...
1 命令的输入方法及操作步骤 在绘图时,可以用两种方法:一种是键盘输入,一种是鼠标输入.新手建议大家先使用鼠标输入.等我们熟悉这些功能键之后,可以使用快捷键来快速提高绘图效率.鼠标输入可以直接点击工具 ...
- Docker在Centos7安装、及命令(详细安装教程)
Docker在Centos7安装.及命令(详细安装教程) 为什么使用Docker Docker中包括三个基本概念 Docker安装 Docker获取镜像 使用刚刚获取的centos镜像,创建一个容器, ...
- python写通讯录_Python实现命令行通讯录实例教程
1.实现目标 编写一个命令行通讯录程序,可以添加.查询.删除通讯录好友及电话 2.实现方法 创建一个类来表示一个人的信息.使用字典存储每个人的对象,名字作为键. 使用pickle模块永久地把这些对象存 ...
最新文章
- 服务器可以响应字符类型的数据吗,HTTP - Response
- 正则表达式学习神器!
- java 使用servlet做学生管理系统(无框架)
- C#委托的介绍(delegate、Action、Func、predicate)
- Spring框架中bean的生命周期
- mysql sql select_mysql SQL Select 语句 简单应用
- leetcode 797. All Paths From Source to Target | 797. 所有可能的路径(回溯法)
- 新Rider预览版发布,对F#的支持是亮点
- Linux加密框架crypto crypto_alg|cipher_alg数据结构|AES例子
- 模拟电子技术不挂科学习笔记3(放大电路的分析方法)
- Facebook账户 “ 解封、防封、养号 ” 知识要点
- Spring整合MyBatis之MapperFactoryBean
- json 转 map,循环得到 key,value
- matlab gui串口通信,Matlab GUI上位机界面实现串口通信
- Linux服务器网卡驱动安装及故障排除
- teraterm linux环境,linux ssh telnet TeraTerm终端中文显示乱码解决方法
- 皮尔逊相关系数公式手写代码【Python+详细注解】(Pearson correlation coefficient)
- rails分页(kaminari)
- (转)当android调试遇到ADB server didn't ACK以及顽固的sjk_daemon进程 .
- Excel如何提取单元格中最后一次出现的数值