Open ericvlog opened 2 years ago
To add a swap file:
Create the file. This command creates a 1 gigabyte file: dd if=/dev/zero of=/swap bs=1M count=1000
dd if=/dev/zero of=/swap bs=1M count=1000
Format the swap file: mkswap /swap
mkswap /swap
chmod 0600 /swap
swapon /swap
Add the new swap file to /etc/fstab
nano /etc/fstab
/swap swap swap defaults 0 0
Run swapoff -a && swapon -a to activate the new swap.
swapoff -a && swapon -a
You can run free -m to find the swap space used in megabytes before and after the allocation of swap space.
https://serverfault.com/questions/218122/how-do-i-increase-swap-memory-in-debian
To add a swap file:
Create the file. This command creates a 1 gigabyte file:
dd if=/dev/zero of=/swap bs=1M count=1000
Format the swap file:
mkswap /swap
chmod 0600 /swap
swapon /swap
Add the new swap file to /etc/fstab
nano /etc/fstab
/swap swap swap defaults 0 0
Run
swapoff -a && swapon -a
to activate the new swap.You can run free -m to find the swap space used in megabytes before and after the allocation of swap space.
https://serverfault.com/questions/218122/how-do-i-increase-swap-memory-in-debian