8 Linux ‘Parted’ Commands to Create, Resize and Rescue Disk Partitions

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Marin Todorov

I am a bachelor in computer science and a Linux Foundation Certified System Administrator. Currently working as a Senior Technical support in the hosting industry. In my free time I like testing new software and inline skating.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

15 Responses

  1. Abhishek Padghan says:

    What if I forgot to mention mklabel in parted will it cause any issues ?

  2. Kier says:

    Do you need free space or unallocated space to resize a partition? i want to resize a partition but all space is allocated to some partitions or another

  3. Ethan says:

    Uhh, before resizepart, don’t you need to run resize2fs first to shrink the data?

  4. Wellington Torrejais da Silva says:


  5. Henry says:

    GNU Parted 3.1
    This version don’t have resizepart command!!

  6. Kumar Nikhil says:

    resizepart not working in 2.1 edition. why it so?

    • Marin Todorov says:

      Version 2.1 is an older one and the option in there is called “resize”. See below:

      $ parted -v
      parted (GNU parted) 2.1

      $ parted -h | grep resize
      resize NUMBER START END resize partition NUMBER and its file

      It’s always a good practice to check command’s manual and help list and look for additional options you may need.

      • Matt M. says:

        resize and resizepart aren’t included in the RHEL/CentOS versions of parted, for whatever reason.

        • Marcin says:

          For RHEL, resize function was added in version 3.1-29

          * Thu Aug 10 2017 Brian C. Lane – 3.1-29
          – Add support for NVMe devices
          Resolves: rhbz#1316239
          – Backport partition resize command
          Resolves: rhbz#1423357

  7. Ino Van Winckel says:


    I tried to resize my primary partition and it worked, the only problem i run into now is that linux thinks the whole partition is full but I know it’s all free space… How can I allocate this free space on my HD into the primary partition and use it as free space?

    • Hello Ino,

      Do you mean that the new partition is showed as allocated? If the whole partition is free, did you try to format it? Alternatively, you may try to run resize2fs on the partition you are resizing and see if this resolves the issue for you.

  8. Jalal Hajigholamali says:

    Very nice article

    Thanks a lot

  9. K Raghunathan says:

    Useful list of parted functions. Resizing, particularly, needed when os has been updated repeatedly. Thanks

Leave a Reply to Ravi Saive Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.