0

I don't want to disable the swap completely, I just don't want to start automatically on boot. What is the best way to do that ,should I execute the swapoff command or do I have to comment out swap line in the /etc/fstab.

2
  • 1
    Comment the line out in /etc/fstab - you can always use swapon -a if you want to bring it online – ivanivan Jan 12 '18 at 19:19
  • please note after swap -a uncomment that line to have it mounted at boot again. – George Udosen Jan 12 '18 at 19:50
0

Change the /etc/fstab line from:

/dev/sd1 swap swap defaults 0 0

to:

/dev/sd1 swap swap noauto 0 0

and bask in afterglow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.