# 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 注:d是删除一个分区的动作;
l list known partition types 注:l是列出分区类型,以供我们设置相应分区的类型;
m print this menu 注:m是列出帮助信息;
n add a new partition 注:n是添加一个分区;
o create a new empty DOS partition table
p print the partition table 注:p是列出分区表;
q quit without saving changes 注:q是不保存退出;
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 注:w是把分区表写入硬盘并退出;
x extra functionality (experts only) 注:x是扩展应用,专家功能;
其实我们常用的是标有中文注释的,其它的功能我们不常用;一般的情况下只要懂得 d l m n p q t w 就行了。
# fdisk /dev/sda
Command (m for help): x
Expert command (m for help): m 注:在这里按m ,就会输出帮助;
Command action
b move beginning of data in a partition
c change number of cylinders
d print the raw data in the partition table
e list extended partitions
f fix partition order 注:f是重新获得该磁盘的分区号;
g create an IRIX (SGI) partition table
h change number of heads
m print this menu
p print the partition table
q quit without saving changes
r return to main menu
s change number of sectors/track
v verify the partition table 注:v是显示分区表信息;
w write table to disk and exit 注:w是把分区表写入硬盘并退出;