4.2. Viewing the partition table with parted


Display the partition table of a block device to see the partition layout and details about individual partitions. You can view the partition table on a block device by using the parted utility. For more information, see the parted(8) man page on your system.

Procedure

  1. Start the parted utility. For example, the following output lists the device /dev/sda:

    # parted /dev/sda
  2. View the partition table:

    (parted) print
    
    Model: ATA SAMSUNG MZNLN256 (scsi)
    Disk /dev/sda: 256GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos
    Disk Flags:
    
    Number  Start   End     Size    Type      File system  Flags
     1      1049kB  269MB   268MB   primary   xfs          boot
     2      269MB   34.6GB  34.4GB  primary
     3      34.6GB  45.4GB  10.7GB  primary
     4      45.4GB  256GB   211GB   extended
     5      45.4GB  256GB   211GB   logical
  3. Optional: Switch to the device you want to examine next:

    (parted) select block-device

    For a detailed description of the print command output, see the following:

    Model: ATA SAMSUNG MZNLN256 (scsi)
    The disk type, manufacturer, model number, and interface.
    Disk /dev/sda: 256GB
    The file path to the block device and the storage capacity.
    Partition Table: msdos
    The disk label type.
    Number
    The partition number. For example, the partition with minor number 1 corresponds to /dev/sda1.
    Start and End
    The location on the device where the partition starts and ends.
    Type
    Valid types are metadata, free, primary, extended, or logical.
    File system
    The file system type. If the File system field of a device shows no value, this means that its file system type is unknown. The parted utility cannot recognize the file system on encrypted devices.
    Flags
    Lists the flags set for the partition. The most commonly used flags are boot, root, swap, hidden, raid, lvm, or lba. For a complete list of flags, see parted(8) man page on your system.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部