Skip to content

Instantly share code, notes, and snippets.

@aliuygur
Created May 28, 2015 13:59
Show Gist options
  • Save aliuygur/747085c940d9b96681f3 to your computer and use it in GitHub Desktop.
Save aliuygur/747085c940d9b96681f3 to your computer and use it in GitHub Desktop.
this file add 4GB swap file to ubuntu 14.04 x64
#!/bin/bash
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo "/swapfile none swap sw 0 0" >> /etc/fstab
echo "Added!"
free -m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment