大學生新聞網,大學生新聞發布平臺
大學生新聞網
大學生新聞大學生活校園文學大學生村官
社會實踐活動社會實踐經歷社會實踐報告社會實踐總結社會實踐心得
全國排名校友會版軟科排名分類排名本科排名一本排名二本排名專科排名學校地址
求職簡歷職場法則面試技巧職場故事求職招聘大學生就業
英語學習計算機學習電氣工程機械工程經濟管理建筑設計財務會計
申請書證明書檢討書自薦信演講稿心得體會調查報告讀后感求職信推薦信其它范文

Linux fdisk命令 – 管理磁盤分區

fdisk命令來自于英文詞組“Partition table manipulator for Linux”的縮寫,其功能是用于管理磁盤的分區信息。如果一套幾百平米的房子內部沒有墻壁,雖然看起來會很敞亮,但是各種聲音、氣味、物品會隨意充斥在整個房子內,讓人極不舒適,因此需要用墻壁按照功能進行劃分,例如臥室、廁所、廚房、陽臺等等。

fdisk命令可以用于對磁盤進行分區操作,用戶可以根據實際情況進行合理劃分,這樣后期掛載和使用時會方便很多。

語法格式:fdisk [參數] [設備]

常用參數:

-b    指定每個分區的大小
-l    列出指定的外圍設備的分區表狀況
-s    將指定的分區大小輸出到標準輸出上,單位為區塊
-u    搭配”-l”參數列表,會用分區數目取代柱面數目,來表示每個分區的起始地址
-v    顯示版本信息
參考實例

查看當前系統的分區情況:

[root@linuxcool ~]# fdisk -l
Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5f1d8ee5
 
Device     Boot   Start      End  Sectors Size Id Type
/dev/sda1  *       2048  2099199  2097152   1G 83 Linux
/dev/sda2       2099200 41943039 39843840  19G 8e Linux LVM
………………省略部分輸出信息………………
管理指定硬盤的分區(過程省略,以《Linux就該這么學》第6章節為準):

[root@linuxcool ~]# fdisk /dev/sda
Welcome to fdisk (util-linux 2.32.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
 
Command (m for help): n 
All space for primary partitions is in use.
Command (m for help): m 
 
Help:
  DOS (MBR)
   a   toggle a bootable flag
   b   edit nested BSD disklabel
   c   toggle the dos compatibility flag
 
  Generic
   d   delete a partition
   F   list free unpartitioned space
   l   list known partition types
   n   add a new partition
   p   print the partition table
   t   change a partition type
   v   verify the partition table
   i   print information about a partition
 
  Misc
   m   print this menu
   u   change display/entry units
   x   extra functionality (experts only)
 
  Script
   I   load disk layout from sfdisk script file
   O   dump disk layout to sfdisk script file
 
  Save & Exit
   w   write table to disk and exit
   q   quit without saving changes
 
  Create a new label
   g   create a new empty GPT partition table
   G   create a new empty SGI (IRIX) partition table
   o   create a new empty DOS partition table
   s   create a new empty Sun partition table
………………省略部分輸出信息………………
    作者:大學生新聞網    來源:大學生新聞網
    發布時間:2025-03-13    閱讀:
    掃一掃 分享悅讀
  • Linux rm命令 – 刪除文件或目錄
  • rm命令來自于英文單詞remove的縮寫,其功能是用于刪除文件或目錄,一次可以刪除多個文件,或遞歸刪除目錄及其內的所有子文件。
  • 03-12 關注:4
主站蜘蛛池模板: 欧美色图在线播放| 色悠久久久久久久综合网伊人 | 成人污视频在线观看| 午夜影院小视频| jizzjizz国产精品久久| 波多野结衣cesd—819高清| 国产精品欧美一区二区三区 | 日韩a一级欧美一级在线播放| 国产va精品免费观看| jizz免费在线观看| 欧美国产日韩综合| 国产午夜亚洲精品国产| 一本久久综合亚洲鲁鲁五月天| 正在播放宾馆露脸对白视频| 国产精品扒开做爽爽爽的视频| 九九九国产视频| 妞干网在线免费观看| 大象传媒在线观看| 亚洲国产成人超福利久久精品 | 中文字幕日韩高清版毛片| 精品一区二区三区在线视频| 国内一级特黄女人精品毛片| 久久综合九色综合97免费下载| 老司机免费在线| 亚洲黄色片一级| 四虎最新紧急更新地址| 无码高潮少妇毛多水多水免费| 催眠美丽人妇系列| 国产香蕉在线精彩视频| 成人精品一区二区三区电影| 亚洲精品亚洲人成在线播放| 麻豆tv入口在线看| 天堂网404在线资源| 乱人伦人妻中文字幕| 精品人妻少妇嫩草AV无码专区| 国产精品成在线观看| 中文字幕不卡一区| 欧美日韩亚洲成色二本道三区 | 精品永久久福利一区二区| 在公车上被一个接一个| 久久成人福利视频|