sudo fallocate -l 2G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile
This allows you to add 2G to SWAP.
If you want to add extra, create a new file with different name, i.e. /swapfile20G