LinuxCommandLibrary

gparted

Manage disk partitions graphically

SYNOPSIS

gparted [options] [device]

PARAMETERS

device
    Specifies the disk device to open, e.g., /dev/sda. If omitted, gparted typically opens the first detected disk.

--help
    Displays a help message with command usage and options.

--version
    Outputs the gparted version information.

DESCRIPTION

gparted is a powerful and intuitive graphical partition editor for Linux-based operating systems. It provides a user-friendly interface to manage disk partitions, allowing users to create, delete, resize, move, copy, check, and label partitions without data loss (though backups are always recommended). gparted supports a wide array of file systems, including common ones like ext2/3/4, FAT16/32, NTFS, btrfs, XFS, JFS, and ReiserFS, as well as Linux swap. It is an essential tool for setting up new hard drives, reorganizing disk space, creating dual-boot systems, or repairing partition tables. Its visual representation of disk layouts makes complex partitioning tasks more accessible to users of all skill levels. gparted typically runs with root privileges and is often used from a live CD/USB environment to ensure no partitions are mounted during critical operations.

CAVEATS

Data Loss Risk: While gparted aims for non-destructive operations, errors, power failures, or incorrect usage can lead to data loss. Always back up critical data before performing any disk partitioning operations.
Root Privileges: gparted requires root privileges to run and modify disk partitions.
Unmounted Partitions: For most operations (especially resizing or moving), the target partition(s) must be unmounted. This is why gparted is frequently used from a live Linux distribution.
Time Consuming: Operations like moving or resizing large partitions, especially with data, can take a significant amount of time.
Apply Operations: Changes are not applied immediately; they are queued and must be explicitly applied by the user via the "Apply All Operations" button.

<I>RUNNING FROM LIVE MEDIA</I>

It is highly recommended to run gparted from a live Linux distribution (e.g., a bootable USB stick or DVD) to ensure that no partitions are mounted. This minimizes the risk of data corruption and allows operations on all partitions of the primary disk.

<I>DISK SELECTION</I>

When gparted starts, it typically displays the first detected hard disk. Users can select different disk devices (e.g., /dev/sdb, /dev/nvme0n1) from a dropdown menu in the top right corner of the interface.

HISTORY

gparted was initially developed by Curtis Gedak and first released around 2004. It quickly gained popularity as a user-friendly graphical frontend for the powerful GNU Parted command-line utility. Its design aimed to simplify complex disk management tasks, making them accessible to a wider audience than command-line tools. Over the years, it has become a staple in virtually all major Linux distributions and is a key component of many live Linux rescue CDs and USB drives (like PartedMagic, SystemRescueCD, and Ubuntu Live CDs), enabling users to manage partitions easily without installing an operating system. Continuous development has added support for new file systems and partition table types (like GPT).

SEE ALSO

parted(8): Command-line partition editor, gparted's backend., fdisk(8): Traditional partition table manipulator (primarily MBR)., cfdisk(8): Curse-based fdisk alternative., sfdisk(8): Scriptable partition manipulator., lsblk(8): List block devices., mount(8): Mount a filesystem., mkfs(8): Build a Linux filesystem.

Copied to clipboard