This tutorial will help you to Add Swap on Debian 11 Bullseye Linux system.

How to Create Swap in Debian 11

Use the below steps to create and enable Swap memory on your Debian 11 system via command line.

Make Swap Permanent

After running above commands, Swap memory is added to your system and operating system can use when required. But after reboot of system swap will deactivate again. You can make it permanent by appending the following entry in /etc/fstab file. Edit fstab file in editor: and add below entry to end of file:

Save file and close. Now Swap memory will remain activate after system reboots.

Configure Swappiness

Now change the swappiness kernel parameter as per your requirement. It tells the system how often system utilize this swap area. Edit /etc/sysctl.conf file: append following configuration to end of file Now reload the sysctl configuration file

Conclusion

Now the operating system can use swap memory in case of low physical memory. In this tutorial, you have learned to create and enable Swap memory on Debian 11 Linux system.

How To Add Swap Space on Debian 11   TecAdmin - 55How To Add Swap Space on Debian 11   TecAdmin - 20How To Add Swap Space on Debian 11   TecAdmin - 39