1 dd IF = / dev / ZERO = of = / swap bs 1024 COUNT = 4096000 # to create a large enough file 2 # COUNT is equal to 1024 x file size you want, 4096000 is 4G 3 mkswap / swap this # file becomes swap file 4 swapon / swap enable this swap file # 5 / swap swap swap Defaults 0 0 # to automatically load at each boot time swap file, you need to / etc / increase in line fstab file 6 CAT / proc / swaps # View swap 7 swapoff - A # close the swap 8 swapon -a # open swap