fullnode icon indicating copy to clipboard operation
fullnode copied to clipboard

Best way to disable the Swap File on Raspbian

Open MrChrisJ opened this issue 9 years ago • 1 comments

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

MrChrisJ avatar Feb 24 '16 22:02 MrChrisJ

Since jessie is systemd, one might also use:

sudo systemctl disable dphys-swapfile

Check with

sudo systemctl status dphys-swapfile 

Reboot and check again ....

marrem avatar Dec 01 '16 22:12 marrem