Linux partition command -gdisk and swap partition

gdisk

The gdisk command is very similar to the fdisk command, mainly for the partition tool of the GPT partition table

Interactive command
n Add a new partition
i Display partition details
w Write partition table to referee and exit (save and exit)
q Exit gdisk program without saving any changes
o Create a new blank GPT partition table

Create partition

  1. Add Disk

  2. Use the parted command to modify the partition table type to gpt
    parted command

  3. Creating a new partition
    Insert picture description here
    is very similar to the fdisk command
    Insert picture description here

  4. Format partition

    Note: Successfully does not appear after the partition is completed. We can use partprobe to update the partition information to the kernel ~

Insert picture description here

  1. Mount manually
    Insert picture description here
  2. Auto-mount
    operation is at the end

gdisk create swap partition

  1. View swap partition status

    Show 2G swap partition size
    Insert picture description here

  2. Create swap partition

    Special Note: The swap information will be displayed after the 8200 is
    Insert picture description here
    created
    Insert picture description here

  3. Format swap

    Note that the swap partition configuration information must take effect first
    Insert picture description here

  4. Enable swap partition

    Swap must be enabled, otherwise free can not see the updated information
    Insert picture description here

  5. Set automatic loading
    automatic loading operation at the end

Published 51 original articles · Likes5 · Visits 1080

Guess you like

Origin blog.csdn.net/weixin_46669463/article/details/105664438