Skip to content

Instantly share code, notes, and snippets.

@yanaga
Created January 16, 2012 02:25
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 yanaga/1618717 to your computer and use it in GitHub Desktop.
Save yanaga/1618717 to your computer and use it in GitHub Desktop.
Creating a 512M swap file on Linux HOWTO
sudo dd if=/dev/zero of=/swap bs=1024 count=524288
sudo chmod 600 /swap
sudo mkswap /swap
sudo swapon /swap
cat << EOF | sudo tee -a /etc/fstab
/swap none swap sw 0 0
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment