Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save netzulo/b7966005e368559beb45f01b9bfb2daf to your computer and use it in GitHub Desktop.
Save netzulo/b7966005e368559beb45f01b9bfb2daf to your computer and use it in GitHub Desktop.
RaspberryPi [1,2,zero,3]Increment size of SWAP ram

How to change swap partition from 99mb to 1024 mb ?

  • Put OFF swap partition
sudo dphys-swapfile swapoff
  • Edit this file
sudo vim /etc/dphys-swapfile
  • Change variable CONF_SWAPSIZE=100 with new value 1024 ( size on MB )
CONF_SWAPSIZE=100
  • Update File size with script
sudo dphys-swapfile setup
  • Put ON swap partition
sudo dphys-swapfile swapon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment