Linux fdisk命令
Linux fdisk是一個創(chuàng)建和維護分區(qū)表的程序,它兼容DOS類型的分區(qū)表、BSD或者SUN類型的磁盤列表。
語法
fdisk [必要參數(shù)][選擇參數(shù)]
必要參數(shù):
- -l 列出素所有分區(qū)表
- -u 與"-l"搭配使用,顯示分區(qū)數(shù)目
選擇參數(shù):
- -s 指定分區(qū)
- -v 版本信息
菜單操作說明
- m :顯示菜單和幫助信息
- a :活動分區(qū)標記/引導(dǎo)分區(qū)
- d :刪除分區(qū)
- l :顯示分區(qū)類型
- n :新建分區(qū)
- p :顯示分區(qū)信息
- q :退出不保存
- t :設(shè)置分區(qū)號
- v :進行分區(qū)檢查
- w :保存修改
- x :擴展應(yīng)用,高級功能
實例
顯示當前分區(qū)情況:
# fdisk -l Disk /dev/sda: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 1305 10377990 8e Linux LVM Disk /dev/sdb: 5368 MB, 5368709120 bytes 255 heads, 63 sectors/track, 652 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdb doesn't contain a valid partition table
顯示SCSI硬盤的每個分區(qū)情況
# fdisk -lu Disk /dev/sda: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders, total 20971520 sectors Units = sectors of 1 * 512 = 512 bytes Device Boot Start End Blocks Id System /dev/sda1 * 63 208844 104391 83 Linux /dev/sda2 208845 20964824 10377990 8e Linux LVM Disk /dev/sdb: 5368 MB, 5368709120 bytes 255 heads, 63 sectors/track, 652 cylinders, total 10485760 sectors Units = sectors of 1 * 512 = 512 bytes Disk /dev/sdb doesn't contain a valid partition table
更多建議: