Linux
dd if=/dev/zero of=/swapfile bs=1M count=2048 mkswap /swapfile chmod 600 /swapfile swapon /swapfile