Commands
Extend partition size
- Get PV (Physical Volume) name (Ex: /dev/sda1)
sudo pvs
- Resize the PV
sudo pvresize /dev/sda1
- Get root logical volume name (Filesystem value of / row; ex: /dev/mapper/ubuntu--vg-root)
df -h
- Expand logical volume
sudo lvextend -r -l +100%FREE /dev/mapper/ubuntu--vg-root
Source:
Create sudo user
First create the user:
adduser sammy
Add user to the sudo group:
usermod -aG sudo sammy
Then either logout and log back in, or switch to the user:
su - sammy
Source: