Skip to content

Linux parted Guide

Mattscreative edited this page Dec 5, 2025 · 2 revisions

Linux parted Guide

Complete beginner-friendly guide to parted on Linux, covering Arch Linux, CachyOS, and other distributions including disk partitioning, GPT/MBR tables, and advanced partition management.


Table of Contents

  1. Understanding parted
  2. parted Installation
  3. parted Basics
  4. Creating Partitions
  5. Managing Partitions
  6. Troubleshooting

Understanding parted

What is parted?

parted is GNU partition editor.

Features:

  • GPT support: Works with GPT partition tables
  • MBR support: Works with MBR partition tables
  • Resize: Can resize partitions
  • Advanced: More features than fdisk

Uses:

  • Create partitions: Make new partitions
  • Resize partitions: Change partition size
  • Move partitions: Relocate partitions
  • Create tables: Initialize partition tables

parted Installation

Install parted

Arch/CachyOS:

# Install parted
sudo pacman -S parted

# Usually pre-installed

Debian/Ubuntu:

sudo apt install parted

Fedora:

sudo dnf install parted

Launch parted

Start parted:

# Open disk
sudo parted /dev/sda

# Interactive mode
# Type 'help' for commands

parted Basics

View Partitions

List partitions:

# In parted
print

# Or command line
sudo parted /dev/sda print

Select Disk

Choose device:

# In parted
select /dev/sda

# Or start with device
sudo parted /dev/sda

Creating Partitions

Create Partition Table

Initialize table:

# In parted
mklabel gpt

# Or MBR
mklabel msdos

Create Partition

New partition:

# In parted
mkpart primary ext4 1MiB 10GiB

# Format:
# mkpart [type] [fs-type] [start] [end]

Managing Partitions

Resize Partition

Change size:

# In parted
resizepart 1 20GiB

# Resize partition 1 to 20GB

Delete Partition

Remove:

# In parted
rm 1

# Delete partition 1

Troubleshooting

parted Errors

Check disk:

# Print partition table
sudo parted /dev/sda print

# Check for errors
sudo parted /dev/sda check

Summary

This guide covered parted usage, partition management, and disk partitioning for Arch Linux, CachyOS, and other distributions.


Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.

Clone this wiki locally