21zoo Labs - Assorted Stuff

Enable Swap on Ubuntu

Posted — Dec 1, 2017

Enable Swap on Ubuntu

sudo fallocate -l 2G /swapfile

sudo chmod 600 /swapfile

sudo mkswap /swapfile

sudo swapon /swapfile

echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab