Linux swap with dphys-swapfile
This is a solution for a #RaspberryPi, some #VPS without swap of some machine setup without swap where you need swap for something without wanting to fiddle with the drive partitions or so. This is a quick and dirty “short manual” for #Debian based #Systemd environments (such as #Ubuntu, #Mint or #Raspbian). First run this: cat > dphys-swap.sh << EOF #!/bin/bash #~/up apt-get install dphys-swapfile echo "CONF_SWAPSIZE=2048"|tee -a /etc/dphys-swapfile dphys-swapfile setup dphys-swapfile swapon systemctl restart dphys-swapfile.service systemctl status dphys-swapfile.service free -h EOF This will just create a short #bash #script with the needed commands to run to get #dphys setup and running. Please alter the number 2048 to your need, it is the size of the swap memory that will be setup. The size of the swap should most likely by equal to the real memory installed, sometimes twice the size seems to be a good choice too. ...