2 comandos:
~$ cat /proc/swaps
Filename Type Size Used Priority
/swapfile file 2097148 0 -1
e
$ grep swap /etc/fstab
/swapfile none swap sw 0 0
Então, ambos apontam para:
$ cd / && ls -l swapfile
-rw------- 1 root root 2147483648 apr 2 18:56 swapfile
Desativar e remover:
sudo swapoff /swapfile
sudo rm /swapfile
Crie um swapfile de 2Gb, defina as permissões, formate-o como swap e ative-o:
sudo fallocate -l 2g /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile