June 2025
Beginner to intermediate
1180 pages
37h 48m
English
If there isn’t enough memory to run all programs, and swap partitions or files are available, then Linux swaps parts of the memory there (paging). This way, Linux can use more memory than is available in RAM.
Setting up a swap partition is usually done as part of the installation. You can check whether and how much swap space is available or actually used by using the free command. In the example ahead, 1,519 MiB of RAM and 2,000 MiB of swap memory are available. Of the RAM, 401 MiB is currently used for programs and data, and the rest is used as a buffer or cache for files. The swap memory is currently unused:
root# free -m total used free shared buffers cachedMem: 1519 1479 39 0 67 1010-/+ buffers/cache: ...Read now
Unlock full access