Linux common commands-14: fdisk

fdisk is a disk partitioning tool. It can perform hard disk partition operations, such as creating, deleting, formatting, etc. Using this command requires special care, and it also requires administrator privileges.

Syntax format: fdisk [parameter]

Common parameters:

Example

 # 查看所有分区情况,包括多个磁盘sudo fdisk -l

 # 操作某个磁盘sudo fdisk /dev/sda

Enter m to view the corresponding command

Common such as, n create a partition, t modify the partition type, d delete the partition, w save the changes and exit, q do not save the changes and exit

This article is reprinted from https://xugaoxiang.com/2022/06/03/linux-cmds-14-fdisk/
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment