Creer Une partition Swap apres install
Ajout partition swap apres une install
Si je veux ajouter 4Go :
sudo fallocate -l 4G /swapfile STEP 4: SWAP file is created. Let’s give root-only permissions to it.
sudo chmod 600 /swapfileSTEP 5: Mark the file as SWAP space:
sudo mkswap /swapfileSTEP 6: Finally enable the SWAP.
sudo swapon /swapfileSTEP 7: You can now check using the same swapon command to check if SWAP is created.
sudo swapon --showSTEP 8: Also recheck the final partition structure.
free -hSTEP 9: Once everything is set, you must set the SWAP file as permanent, else you will lose the SWAP after reboot. Run this command:
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab