Skip to content

Instantly share code, notes, and snippets.

@alexrios
Created August 22, 2021 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexrios/6630bb938ec0112c857742eee8223dd2 to your computer and use it in GitHub Desktop.
Save alexrios/6630bb938ec0112c857742eee8223dd2 to your computer and use it in GitHub Desktop.
Create swap file on Arch (run with sudo)
#!/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