search

Add Swap to Ubuntu


How to add swap to Ubuntu

This only the commands. Full referenceĀ can be foundĀ here.

sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon -s
sudo nano /etc/fstab
/swapfile none swap sw 0 0

Leave a Reply

Your email address will not be published. Required fields are marked *

close
Categories

Hi, guest!

settings