返回命令列表

Linux command

gdisk 命令

安全

May affect permissions or system state. Check the target first.

命令示例

List

sudo gdisk -l

Example

sudo gdisk /dev/sdX

说明

gdisk is an interactive GPT (GUID Partition Table) partitioning tool, similar to fdisk but designed specifically for GPT disks. It can create, delete, and modify partitions on modern UEFI systems. GPT is the modern partitioning scheme that replaces MBR (Master Boot Record), supporting disks larger than 2TB and more than 4 primary partitions (up to 128). gdisk maintains both primary and backup partition tables for redundancy. gdisk can also convert MBR disks to GPT (and vice versa with sgdisk), though this should be done carefully with backups.

参数

-l, --list
List partition tables for all devices and exit
device
Device to partition (e.g., /dev/sda, /dev/nvme0n1)

FAQ

What is the gdisk command used for?

gdisk is an interactive GPT (GUID Partition Table) partitioning tool, similar to fdisk but designed specifically for GPT disks. It can create, delete, and modify partitions on modern UEFI systems. GPT is the modern partitioning scheme that replaces MBR (Master Boot Record), supporting disks larger than 2TB and more than 4 primary partitions (up to 128). gdisk maintains both primary and backup partition tables for redundancy. gdisk can also convert MBR disks to GPT (and vice versa with sgdisk), though this should be done carefully with backups.

How do I run a basic gdisk example?

Run `sudo gdisk -l` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -l, --list do in gdisk?

List partition tables for all devices and exit