401
Comment:
|
401
|
Deletions are marked like this. | Additions are marked like this. |
Line 9: | Line 9: |
echo '/swapfile${swapspace} none swap sw 0 0' | sudo tee -a /etc/fstab | echo "/swapfile${swapspace} none swap sw 0 0" | sudo tee -a /etc/fstab |
Add a swapfile to a Linux box (Ubuntu
1. Paste into a terminal, it adds a 8G swapfile to the VM/Machine.
export swapspace="2G" sudo fallocate -l ${swapspace} /swapfile${swapspace} sudo mkswap /swapfile${swapspace} echo "/swapfile${swapspace} none swap sw 0 0" | sudo tee -a /etc/fstab sudo swapon -a free -h cat /proc/sys/vm/swappiness
...