fullnode
fullnode copied to clipboard
Best way to disable the Swap File on Raspbian
Ok so one issue I am having is the how to disable and re-enable the Swapfile on the Raspbian Jessie OS. So far the best source I found was from the first comment on this post:
To disable:
sudo chmod -x /etc/init.d/dphys-swapfile
sudo swapoff -a
sudo rm /var/swap
Then to re-enable it looks like all you have to do is:
sudo chmod +x /etc/init.d/dphys-swapfile
sudo nano /etc/dphys-swapfile
sudo dphys-swapfile setup
Anybody know of better ways? I want to add this to the video I am making. The draft is here: https://www.youtube.com/watch?v=pbWimjc0cig
Since jessie is systemd, one might also use:
sudo systemctl disable dphys-swapfile
Check with
sudo systemctl status dphys-swapfile
Reboot and check again ....