Where Is Swap Space in Linux?
Contents

The swap space is located on disk, in the form of a partition or a file. Linux uses it to extend the memory available to processes, storing infrequently used pages there. We usually configure swap space during the operating system installation. But, it can also be set afterward by using the mkswap and swapon commands.

How do I get swap space in Linux?

To see swap size in Linux, type the command: swapon -s . You can also refer to the /proc/swaps file to see swap areas in use on Linux. Type free -m to see both your ram and your swap space usage in Linux. Finally, one can use the top or htop command to look for swap space Utilization on Linux too.

What is swap in Linux partition?

A swap partition is treated in Linux as the extension of RAM. Swap partitions are used as virtual memory when the system runs out of physical memory. One or more pages of RAM that have not been used recently are swapped out to make RAM available. …

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest