Simple swap setup script for Linux.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 7cb9aea Aug 17, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Added Anisble script Mar 23, 2016
LICENSE Initial commit Aug 20, 2015 Add curl download Aug 17, 2018 Fix small comment typos Aug 17, 2018


Simple swap setup script for Linux

Swap is an area on a hard drive that has been designated as a place where the operating system can temporarily store data that it can no longer hold in RAM.

Disclamer: This script may not work on every GNU/Linux distro. Sorry.


First of all, download the main script:

wget -O swap
# or
curl -o swap

Then simply run the file with this format:

sh swap <size>

Example (with 4G):

sh swap 4G

The default path for the swap file is /swapfile. If you wish to change this, simple the file location (file must not exist) add it to the command:

sh swap 4G /swap