I've got a virtual Ubuntu 18.04 server which is running low on disk space. As this is a virtual server I increased the hard disk size in vSphere. I can see the free space in cfdisk but am unsure how to expand the filesystem partition to take advantage of the new space. I can see there is a resize option for the partition but I'm unclear on whether or not that will also format the partitions and lose my data... Bit of a linux n00b, any help would be greatly appreciated.
Device Start End Sectors Size Type /dev/sda1 2048 4095 2048 1M BIOS boot /dev/sda2 4096 41940991 41936896 20G Linux filesystem Free space 41940992 104857566 62916575 30G