Create Swap File on Ubuntu

This is a small .sh sript, which creates SWAP file on Ubuntu.

Usage

  1. Upload swap.sh file to your Ubuntu server.

  2. Run "sh ./swap.sh"

  3. Done.

** In some cases you'll have to run it as root user or with sudo in front **

Modification

You can open swap.sh file, and change SWAP size or filename.