Create a 512MB swap file
#dd if=/dev/zero of=/mnt/new.swap bs=1M count=512
Change Permission to new.swap
#chmod 600 /mnt/new.swap
Formatting that file to create a swapping device:
#mkswap /mnt/512Mb.swap
Adding the swap to the running system:
#swapon /mnt/512Mb.swap
To check swap info
#cat /proc/meminfo.
Making the change permanent, open fstab
# vi /etc/fstab
Add below line at the end of the file and save.
/mnt/new.swap none swap sw 0 0
#dd if=/dev/zero of=/mnt/new.swap bs=1M count=512
Change Permission to new.swap
#chmod 600 /mnt/new.swap
Formatting that file to create a swapping device:
#mkswap /mnt/512Mb.swap
Adding the swap to the running system:
#swapon /mnt/512Mb.swap
To check swap info
#cat /proc/meminfo.
Making the change permanent, open fstab
# vi /etc/fstab
Add below line at the end of the file and save.
/mnt/new.swap none swap sw 0 0