bash <(curl -L https://raw.githubusercontent.com/kartik-commits/linux_swap/main/deb_swap.sh)
Reboot the system and check if swap is present or not using swapon
or free -h
If swap is not there add this into filesystem table
- Open filesystem table using
gedit /etc/fstab
- Add this in the last line and save
/swapfile none swap sw 0 0
- To remove swap, copy and paste following anywhere in Terminal
cd / && sudo swapoff /swapfile && sudo rm -rf swapfile
Reboot once and check if swap is successfully removed
Inspired from and Credits to SavvyNik