Create a GPT partition with parted

Create a new GPT table and one partition on the whole disk. The old partition table is lost.

parted /dev/sdb -- mklabel gpt mkpart primary ext4 1MiB 100%

tool
linux133 commands
tags
linuxdiskpartitions

More linux commands

  • pvs && pvdisplay

    List LVM physical volumes and how much space they use.

  • vgs && vgdisplay

    List LVM volume groups with free physical extents (PE).

  • lvs -o +devices

    List logical volumes and the devices they live on.

  • lvextend -L +10G /dev/vg0/lv_data && resize2fs /dev/vg0/lv_data

    Add 10G to an LVM logical volume and grow the ext4 filesystem without unmounting it.

  • fallocate -l 2G /swapfile && chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile

    Create a 2G swap file, set permissions, format it and turn it on.

all 133 linux commands