Skip to content

Instantly share code, notes, and snippets.

@wellington1993
Created September 14, 2016 12:59
Show Gist options
  • Save wellington1993/f56fcda228a3ffa8bc3ea65b2a317ae1 to your computer and use it in GitHub Desktop.
Save wellington1993/f56fcda228a3ffa8bc3ea65b2a317ae1 to your computer and use it in GitHub Desktop.
Add Swap Linux
# As root: sudo su -
sudo dd if=/dev/zero of=/swapfile1 bs=10240 count=524288
chown root:root /swapfile1
mkswap /swapfile1
swapon /swapfile1
# vi /etc/fstab
# Add:
# /swapfile1 none swap sw 0 0
free -m
swapon -s
cat /proc/meminfo
grep -i --color swap /proc/meminfo
# top
# atop
# htop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment