What's the easiest way to resize an ext4 partition (or any type partition depending on the method) from the command line (potentially with the fewest commands, but also the easiest to understand)?
Using a tool like Gparted is obviously easy in a GUI, but what about in the command line? I guess text-based GUIs can count for the answer too since it's technically still in the command line. It just needs to be easy.
By partition I mean a simple partition on a single disk of a personal computer (e.g. on a laptop). For example, I want to resize /dev/sda4
. There's no RAIDs, there's not more than one disk drive, there's not anything complicated here. Just a simple partition on a single disk (/dev/sdaX on /dev/sda).
Best Answer
You can use
fdisk
to change your partition table while running.Refer this link http://codesilence.wordpress.com/2013/03/14/live-resizing-of-an-ext4-filesytem-on-linux/:Edit
/etc/fstab
to replace the UUID for the old swap partition with the new one frommkswap
, then turn on swap