When I found my system being too slow, I created a linux-swap with the help of gparted. It has helped me highly, providing a reliable processing speed without any blackening of my screen. But whenever I turn off my system the partition turns to swap off mode. So whenever I turn on my system again, I need to swap on my linux-swap. I am tired of waking it up every time when I start off my system. Is there any way to make my linux-swap to swap on itself as and when the system boots?


Open a terminal and enter:

sudo nano /etc/fstab

You will be asked for your password. Then, add a line to the end of the file:

[swap partition]       none    swap    sw      0       0 

Replace [swap partition] by the name of the partition, e.g. /dev/sda5. Also, be careful not to accidentally change the other lines in the file. Save and reboot.

About nano, this should be written in the lower part of the terminal:

  • Use Ctrl + O (an O as in oven, not a zero) to save the file
  • Use Ctrl + X to exit from nano.
  • I added that to my answer. – Jos Jul 16 '14 at 7:31
  • Press CTRL + O to save the file. Then, press CTRL + X to exit nano. – Jos Jul 17 '14 at 12:37

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.