How to create a partition with parted?
Environment
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Issue
- How can I create a partition with the
partedcommand? - How to use the
partedcommand?
Resolution
The parted package is installed by default on Red Hat Enterprise Linux 7.
The Parted utility allows users to:
- View the existing partition table.
- Create new partitions from free space or additional hard drives.
- Delete existing partitions.
-
By default, the parted package is included when installing Red Hat Enterprise Linux. To start parted, log in as root and type the command
parted /dev/sdaat a shell prompt (where/dev/sdais the device name for the drive you want to configure). -
RHEL 6 Creating a Partition
-
RHEL 7 Creating a Partition
-
RHEL 8 Creating a Partition
-
RHEL 9 Creating a Partition
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.