1. create a 1G file for the swap. sudo fallocate -l 1G /swapfile we can verify that the correct amount of space was reserved by typing: ls -lh /swapfile 2. Enabling the Swap File. 1.Make the file only accessible by typing: sudo chmod 600 /swapfile. 2