Wiki GeRgOsNet Notes d’administration système, réseau et domotique

Vous consultez une ancienne version, enregistrée le 20 mars 2020 par GreG. Voir la version actuelle.

Creer Une partition Swap apres install

Migration depuis l’ancien wiki MediaWiki

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 /swapfile

STEP 5: Mark the file as SWAP space:

sudo mkswap /swapfile

STEP 6: Finally enable the SWAP.

sudo swapon /swapfile

STEP 7: You can now check using the same swapon command to check if SWAP is created.

sudo swapon --show

STEP 8: Also recheck the final partition structure.

free -h

STEP 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