LinuxCommandLibrary

parted.interactive

partition manipulation program that supports both MBR and GPT partition tables

TLDR

Start interactive mode with the specified disk selected

$ sudo parted /dev/sdX
copy
Show partition information in interactive mode
$ print
copy
Select a disk in interactive mode
$ select /dev/sdX
copy
Create a 16 GB partition with filesystem (GPT partition table)
$ mkpart partition_name ext4 0% 16G
copy
Create a partition with filesystem (MBR partition table)
$ mkpart primary ext4 0% 16G
copy
Resize a partition in interactive mode
$ resizepart /dev/sdX1 end_position
copy
Remove a partition in interactive mode
$ rm /dev/sdX1
copy
Display help
$ ?
copy

SYNOPSIS

parted [options] [device]

DESCRIPTION

parted is a partition manipulation program that supports both MBR and GPT partition tables. In interactive mode, it provides a command-line interface for viewing and modifying disk partitions.
The interactive mode allows real-time partition management with immediate feedback on changes. It supports various filesystem types including ext2, ext3, ext4, btrfs, fat16, fat32, ntfs, and xfs.

PARAMETERS

print

Display partition table information
select device
Select a disk to work with
mkpart name fs-type start end
Create a new partition
resizepart partition end
Resize a partition
rm partition
Remove a partition
?
Display help for interactive commands

CAVEATS

Partition changes can result in data loss. Always backup important data before modifying partitions. Some operations require the partition to be unmounted first.

HISTORY

Part of GNU Parted, developed as a free partition editor supporting multiple partition table types and filesystems.

SEE ALSO

parted(8), partprobe(8), fdisk(8), gdisk(8)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community