I made I swap partition with GParted and it works great, since my computer only has 2 GB of memory. But, every time I boot up, I have to execute sudo swapon /dev/sda1 until it enables. How can I set it up so it enables automatically. I am have only been using Ubuntu for three months, so you might have to spell things out for me.
Ubuntu – Why can’t I enable swap on startup
swap
Related Question
- Ubuntu – Mounting a pendrive as a swap partition, having problems
- Ubuntu – Swap not being detected on 14.04 LTS
- Ubuntu – Swap not availlable
- Ubuntu – Problem removing swap partition
- Ubuntu – How to redetect swap partition after formating to enable hibernation
- Ubuntu – How to make hibernation work again on 15.10 after disabling encrypted swap
Best Answer
Swap partitions are enabled either:
/etc/fstab
swapon /dev/<device>
swapon -a
, given that you have some swap devices configured in fstab.Run:
If there's no output, you don't have a swap partition added to /etc/fstab.
If your swap partition is i.e. /dev/sda1 add
to the end of your
/etc/fstab
file and runswapon -a
.Verify that your partition is in use as a swap via