#Disable swapsudo swapoff /swapfile
#Increase the file swap size#This is for 8gb, or 8192mb, change the 8192 to whatever best suits your purposessudoddif=/dev/zero of=/swapfile bs=1M count=8192 oflag=append conv=notrunc
#Make the new file a swap filesudo mkswap /swapfile
#Re-enable the swapsudo swapon /swapfile
#Check to make sure it worked (Will be under "Swap total")cat /proc/meminfo
I use Kubuntu (the horror!) so my commands are Debian-oriented. You may need to do it differently if you use Arch or something. Also mind that the bit oflag=append conv=notrunc appends to the original swapfile, I hardly know how to use dd, so I’m not sure of the flags for not appending.
Sounds good, thank you for the advice. Do you use a swap file or a swap partition?
I just use a swap file.
This is what I do to alter the size
#Disable swap sudo swapoff /swapfile #Increase the file swap size #This is for 8gb, or 8192mb, change the 8192 to whatever best suits your purposes sudo dd if=/dev/zero of=/swapfile bs=1M count=8192 oflag=append conv=notrunc #Make the new file a swap file sudo mkswap /swapfile #Re-enable the swap sudo swapon /swapfile #Check to make sure it worked (Will be under "Swap total") cat /proc/meminfoI use Kubuntu (the horror!) so my commands are Debian-oriented. You may need to do it differently if you use Arch or something. Also mind that the bit
oflag=append conv=notruncappends to the original swapfile, I hardly know how to use dd, so I’m not sure of the flags for not appending.Thanks!