What Does Linux Swap Partition Do?
Contents

You can create a swap partition that is used by Linux to store idle processes when the physical RAM is low. The swap partition is disk space set aside on a hard drive. It is quicker to access RAM than files stored on a hard drive.

What is the purpose of swap partition in Linux?

Swap space in Linux is used when the amount of physical memory (RAM) is full. If the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space. While swap space can help machines with a small amount of RAM, it should not be considered a replacement for more RAM.

What happens if I delete Linux swap partition?

Simply deleting it will probably crash your machine — and the system will then recreate it on reboot anyway. Don’t delete it. A swapfile fills the same function on linux that a pagefile does in Windows. It serves as an extension of RAM.

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest