Create a New Swap File
sudo fallocate -l 2G /swapfile2
sudo chmod 600 /swapfile2
sudo mkswap /swapfile2
sudo swapon /swapfile2
Make the swap file permanent
echo '/swapfile2 none swap sw 0 0' | sudo tee -a /etc/fstab
Check Current swap status
sudo swapon --show
Thank you
๐๐ป♂️