Default 17.04 swap file location
Solution 1:
2 commands:
~$ cat /proc/swaps
Filename Type Size Used Priority
/swapfile file 2097148 0 -1
and
$ grep swap /etc/fstab
/swapfile none swap sw 0 0
So both point to:
$ cd / && ls -l swapfile
-rw------- 1 root root 2147483648 apr 2 18:56 swapfile
Disable and remove:
sudo swapoff /swapfile
sudo rm /swapfile
Create a 2Gb swapfile, set permissions, format it as swap and enable it:
sudo fallocate -l 2g /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile