So you need to grow your $linuxdistro disk

So, you likely just have a single thing with the stuff. /dev/sda is likely your disk, assuming you have a single drive in this virtual machine you are growing and it was installed with the default partitioning. If it isn't this way, wing it with your own /dev/sd$disknumberinfo and see what happens. Or you know more than me about this, created your own partition map that isn't the defaults, and why are you reading this to try and grow a disk. Go write a guide on a harder topic or something constructive.

Apologies for all the caps, but it is data we are talking about, and you CANNOT be too careful.

  1. BACK UP YOUR DATA. SNAPSHOT, BACKUP, AND MORE. Don't even mess around with that.
  2. Run sudo fdisk /dev/sda
  3. use p to list partitions. Assuming your disk is /dev/sda2 (like any default installation), make note of your cylinder start. It'll default it for you, but you know. Assume and it'll make an @$$ out of you and me.
  4. Use d to delete that partition. Spoopy, but necessary. Trust me, it'll get less scary shortly. JUST DON'T HIT W, THAT WILL LOSE YOUR DATA AT THIS POINT.
  5. Press n to create a new primary partition. It should do your defaults perfectly, just double check your values. DO NOT REMOVE THE SIGNATURE. THIS WILL DELETE ALL YOUR DATA.
  6. Hit a to toggle the bootable flag. Likely this will just tell you it doesn't exist, but again, something something assuming.
  7. Use w to write those changes.
  8. You may have to reboot. If you do, do it here. If not, continue to the next step.
  9. Magic, run sudo resize2fs /dev/sda2 (again, assuming default install here)
  10. Profit

Enjoy your disk space, you wasteful human.