linux的fdish的使用 : 设备为例,以下同;
[root@localhost beinan]# fdisk /dev/sda
Command (m for help): 在这里按 m ,就会输出帮助;
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition 注:这是删除一个分区的动作;
l list known partition types 注:l 是列出分区类型,以供我们设置相应分区的类型;
m print this menu 注:m 是列出帮助信息;
n add a new partition 注:添加一个分区;
o create a new empty DOS partition table
p print the partition table 注:p 列出分区表;
q quit without saving changes 注:不保存退出;
s create a new empty Sun disklabel
t change a partition's system id 注:t 改变分区类型;
u change display/entry units
v verify the partition table
w write table to disk and exit 注:把分区表写入硬盘并退出;(保存退出)
x extra functionality (experts only) 注:扩展应用,专家功能;
其实我们常用的只有注有中文的,其它的功能我们不常用(呵,主要是我不会用,否则早会
卖弄一下了);x 扩展功能,也不是常用的;一般的情况下只要懂得 d l m p q t w 就行
了;
Command (m for help): d 注:执行删除分区指定;
Partition number (1-6): 6 注:我想删除 sda6 ,就在这里输入 6 ;
Command (m for help): p 注:再查看一下硬盘分区情况,看是否删除了?
[root@localhost beinan]# fdisk /dev/sda
Command (m for help): 在这里按 m ,就会输出帮助;
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition 注:这是删除一个分区的动作;
l list known partition types 注:l 是列出分区类型,以供我们设置相应分区的类型;
m print this menu 注:m 是列出帮助信息;
n add a new partition 注:添加一个分区;
o create a new empty DOS partition table
p print the partition table 注:p 列出分区表;
q quit without saving changes 注:不保存退出;
s create a new empty Sun disklabel
t change a partition's system id 注:t 改变分区类型;
u change display/entry units
v verify the partition table
w write table to disk and exit 注:把分区表写入硬盘并退出;(保存退出)
x extra functionality (experts only) 注:扩展应用,专家功能;
其实我们常用的只有注有中文的,其它的功能我们不常用(呵,主要是我不会用,否则早会
卖弄一下了);x 扩展功能,也不是常用的;一般的情况下只要懂得 d l m p q t w 就行
了;
Command (m for help): d 注:执行删除分区指定;
Partition number (1-6): 6 注:我想删除 sda6 ,就在这里输入 6 ;
Command (m for help): p 注:再查看一下硬盘分区情况,看是否删除了?