First create and intialize the file to hold the swap. For example, to create a 4GB swapfile, you could use the command: