Creating swapfile in Linux 1. Create empty swap disk file. dd if=/dev/zero of=/root/swapfile bs=1G count=20 2. Permission setting chmod 600 /root/swapfile 3. Make swapdisk mkswap /root/swapfile 4. Swap on swapon /root/swapfile IT/Unix 2021.11.01