Best Answer: How Do I Change Swap Space in Ubuntu?
Contents How Do I Change Swap Size in Ubuntu? Just Follow These Steps: Make All Swap Off. Sudo Swapoff -A. Resize the Swapfile. Sudo Dd If=/Dev/Zero...
Contents
How do I change swap size in Ubuntu?
Just follow these steps:
- Make all swap off. sudo swapoff -a.
- Resize the swapfile. sudo dd if=/dev/zero of=/swapfile bs=1M count=1024.
- Make swapfile usable. sudo mkswap /swapfile.
- Make swapon again. sudo swapon /swapfile.
2 окт. 2014 г.
How do I edit a swap file in Ubuntu?
To change the size of this swap file:
- Disable the swap file and delete it (not really needed as you will overwrite it) sudo swapoff /swapfile sudo rm /swapfile.
- Create a new swap file of the desired size. With thanks to user Hackinet, you can create a 4 GB swap file with the command sudo fallocate -l 4G /swapfile.
15 сент. 2018 г.