2

Linux常用命令-14:fdisk

 2 years ago
source link: https://xugaoxiang.com/2022/06/03/linux-cmds-14-fdisk/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

fdisk 是磁盘的分区工具。通过它可以进行硬盘的分区操作,如创建、删除、格式化等,使用这个命令需要特别小心,同时它也是需要管理员权限的。

语法格式:fdisk [参数]

常用参数:

2e6666f37b6a8d7d.png
# 查看所有分区情况,包括多个磁盘
sudo fdisk -l
8503e05abb2cf10f.png
# 操作某个磁盘
sudo fdisk /dev/sda
75b1a146c91650e7.png

输入 m,可以查看对应的指令

9a459d0c43e91454.png

常见的如,n 创建分区,t 修改分区类型,d 删除分区,w 保存修改并退出,q 不保存修改退出


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK