adding swap file with empty file

dd if=/dev/zero of=/swapfile bs=1024 count=1024k

mkswap /swapfile

chmod 600 /swapfile

swapon /swapfile

nano /etc/fstab

/swapfile swap swap defaults 0 0

cat /proc/sys/vm/swappiness

sysctl vm.swappiness=10

sudo nano /etc/sysctl.conf

vm.swappiness=10

Published by

Leave a Reply

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