...
Code Block | ||
---|---|---|
| ||
sudo dd if=/dev/zero of=/swapfile bs=1M count=17408 sudo mkswap /swapfile sudo chmod 600 /swapfile sudo swapon /swapfile |
Info | ||
---|---|---|
| ||
For please see BTRFS swapfile for information on creating a swapfile. |
Making swap persistent
Doing the above will simply create and enable our swap file. After a reboot our swap file won't be enabled.
...
Let's first enable hibernation. On Arch-based distros , we're going to use a script which automates setting up hibernation. Install the hibernator
package and run it as root.
Warning | ||
---|---|---|
Note: the hibernator script is pulled from the AUR (Arch User Repository) and is a user provided script to help in Arch hibernation setup. You can see what this script is doing here https://github.com/Chrysostomus/hibernator/blob/master/hibernator You'll also need an AUR helper (or to checkout the AUR hibernator package repo and install with makepkg etc.). In the example below we're using
|
Code Block |
---|
yay -S hibernator
sudo hibernator |
...