How to extend swap on Amazon Linux

It is easy.

Let’s say we want to extend it bu 500M, below count = 500 x 1024

sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=500M count=524288
sudo /sbin/mkswap /var/swap.1
sudo /sbin/swapon /var/swap.1

Leave a Reply

Your email address will not be published. Required fields are marked *