« Linux : Gestion de la swap » : différence entre les versions
De www.yakakliker.org
Aucun résumé des modifications  | 
				Aucun résumé des modifications  | 
				||
| (Une version intermédiaire par le même utilisateur non affichée) | |||
| Ligne 1 : | Ligne 1 : | ||
== Identification de la swap ==  | |||
<syntaxhighlight lang="bash">  | |||
swapon --show  | |||
NAME TYPE SIZE USED PRIO  | |||
/swap.img file 8G 0B -2  | |||
ou ceci dans le cas d'une partition swap  | |||
NAME      TYPE      SIZE   USED PRIO  | |||
/dev/dm-1 partition 980M 979,4M   -2  | |||
</syntaxhighlight>  | |||
== Modification du fichier de swap ==  | |||
* Suppression du fichier swap existant  | |||
<syntaxhighlight lang="bash">  | |||
sudo swapoff /swap.img  | |||
sudo rm /swap.img  | |||
</syntaxhighlight>  | |||
* Création d'un nouveau fichier à la taille souhaitée  | |||
<syntaxhighlight lang="bash">  | |||
sudo fallocate -l 32G /swap.img  | |||
sudo chmod 600 /swap.img  | |||
sudo mkswap /swap.img  | |||
sudo swapon /swap.img  | |||
</syntaxhighlight>  | |||
== Liens ==  | == Liens ==  | ||
| Ligne 4 : | Ligne 38 : | ||
[[Catégorie:Linux]]  | [[Catégorie:Linux]]  | ||
[[Catégorie:Swap]]  | [[Catégorie:Swap]]  | ||
		<html>  | |||
<a href="https://www.compteurdevisite.com" title="compteur web gratuit sans pub"><img src="https://counter6.optistats.ovh/private/compteurdevisite.php?c=b4epghealnwlf7wuq7gn3ygll9aywrfx" border="0" title="compteur web gratuit sans pub" alt="compteur web gratuit sans pub"></a>  | |||
		</html>  | |||
		<html>  | |||
<script src='https://storage.ko-fi.com/cdn/scripts/overlay-widget.js'></script>  | |||
<script>  | |||
  kofiWidgetOverlay.draw('yakakliker', {  | |||
    'type': 'floating-chat',  | |||
    'floating-chat.donateButton.text': 'Café',  | |||
    'floating-chat.donateButton.background-color': '#00b9fe',  | |||
    'floating-chat.donateButton.text-color': '#fff'  | |||
  });  | |||
</script>  | |||
		</html>  | |||
Dernière version du 24 mars 2025 à 09:33
Identification de la swap
swapon --show
NAME TYPE SIZE USED PRIO
/swap.img file 8G 0B -2
ou ceci dans le cas d'une partition swap
NAME      TYPE      SIZE   USED PRIO
/dev/dm-1 partition 980M 979,4M   -2
Modification du fichier de swap
- Suppression du fichier swap existant
 
sudo swapoff /swap.img
sudo rm /swap.img
- Création d'un nouveau fichier à la taille souhaitée
 
sudo fallocate -l 32G /swap.img
sudo chmod 600 /swap.img
sudo mkswap /swap.img
sudo swapon /swap.img
Liens
https://geekonweb.fr/agrandir-le-fichier-de-swap-dubuntu-ici-en-version-20-04.html