How To Install Dphys-swapfile?

How To Install Dphys-swapfile?

dphys-swapfile

Autogenerate and use a swap file

Maintainer: Axel Beckert



Section: admin

Install dphys-swapfile

  • Debian apt-get install dphys-swapfile Click to copy
  • Ubuntu apt-get install dphys-swapfile Click to copy
  • Kali Linux apt-get install dphys-swapfile Click to copy
  • Raspbian apt-get install dphys-swapfile Click to copy

dphys-swapfile

Autogenerate and use a swap file

This init.d script exists so one does not need to have a fixed size swap partition. Instead install without swap partition and then run this, with file size (re-)computed automatically to fit the current RAM size. By default (and hence on installation) it creates swapfile twice as big as the present RAM amount with an upper limit of 2 GB. It's also very helpful when included in SD card, USB stick or disk images which are distributed and run on many machines with different amount of RAM, e.g. different models of the Raspberry Pi or cloud images.

Installing dphys-swapfile command is simple. just copy one of the above commands for your operating system and paste it into terminal. This command is available for Debian, Ubuntu, Kali and Raspbian operating systems. Once you run the command it will install the latest version of dphys-swapfile 2026 package in your OS.