Linux fdisk命令

Linux 命令大全

Linux fdisk是一個(gè)創(chuàng)建和維護(hù)分區(qū)表的程序,它兼容DOS類型的分區(qū)表、BSD或者SUN類型的磁盤列表。

語法

fdisk [必要參數(shù)][選擇參數(shù)]

必要參數(shù):

  • -l 列出素所有分區(qū)表
  • -u 與"-l"搭配使用,顯示分區(qū)數(shù)目

選擇參數(shù):

  • -s 指定分區(qū)
  • -v 版本信息

菜單操作說明

  • m :顯示菜單和幫助信息
  • a :活動(dòng)分區(qū)標(biāo)記/引導(dǎo)分區(qū)
  • d :刪除分區(qū)
  • l :顯示分區(qū)類型
  • n :新建分區(qū)
  • p :顯示分區(qū)信息
  • q :退出不保存
  • t :設(shè)置分區(qū)號(hào)
  • v :進(jìn)行分區(qū)檢查
  • w :保存修改
  • x :擴(kuò)展應(yīng)用,高級(jí)功能

在線示例

顯示當(dā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硬盤的每個(gè)分區(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

Linux 命令大全

丰满人妻一级特黄a大片,午夜无码免费福利一级,欧美亚洲精品在线,国产婷婷成人久久Av免费高清