I could not find any information on this anywhere (and I don't want to set up a new 17.04 installation just for that), what is the default location of the swap file in 17.04?
Asked
Active
Viewed 3.7k times
1 Answers
44
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
Rinzwind
- 309,379