Created
August 22, 2021 23:47
-
-
Save alexrios/6630bb938ec0112c857742eee8223dd2 to your computer and use it in GitHub Desktop.
Create swap file on Arch (run with sudo)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
fallocate -l 8G /swapfile | |
chmod 600 /swapfile | |
mkswap /swapfile | |
echo '/swapfile none swap sw 0 0 ' | tee -a /etc/fstab | |
## 1 - reboot | |
## 2 - check swap with: cat /proc/meminfo | grep SwapTotal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment