Skip to content

Instantly share code, notes, and snippets.

@jyap808
Created August 6, 2014 06:56
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 jyap808/aa80f866e31983452bba to your computer and use it in GitHub Desktop.
Save jyap808/aa80f866e31983452bba to your computer and use it in GitHub Desktop.
Create file system swap file
sudo dd if=/dev/zero of=/mnt/myswapfile bs=1M count=1024
ls -l /mnt/myswapfile
sudo chmod 600 /mnt/myswapfile
sudo mkswap /mnt/myswapfile
sudo swapon /mnt/myswapfile

sudo vi /etc/fstab

Add:

/mnt/myswapfile               swap                    swap    defaults        0 0
sudo swapon -s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment