What is swap space in Ubuntu?

The swap file is used to fulfill the need for the physical RAM when the RAM is full but the system still needs additional computational power then it can use the swap space we create to fulfill this need, so in this article, we will understand how to add swap space on ubuntu system step by step.

Note: Only a user with sudo or root access can activate the swap space.

The size for the swap file is based on the size of RAM that you may currently have on your system, for example below is the general idea for the requirement of swap space but it can vary as well:

  • A computer that has less than 2 GB RAM – This requires creating the same size swap 2 times more than the RAM size.
  • A computer that has 2 GB to 8 GB RAM – This requires creating the same size swap as the RAM size.
  • A computer that has more than 8 GB RAM – This requires creating at least 4 GB of the swap files.

How to Add Swap Space on Ubuntu 20.04

Swap file takes space in the disk storage and later act as a memory for computation whenever the RAM in our system is full, it is important to create swap space in the Ubuntu system if you feel like your physical RAM is not enough to compute the work, the swap space can be created without any third party software because the ubuntu has a built-in feature for creating swap space files.

Similar Reads

What is swap space in Ubuntu?

The swap file is used to fulfill the need for the physical RAM when the RAM is full but the system still needs additional computational power then it can use the swap space we create to fulfill this need, so in this article, we will understand how to add swap space on ubuntu system step by step....

How to add swap space on Ubuntu:

Adding the swap space in Ubuntu follows two steps, in the first step we create the swap file and then in the second step we activate the swap space on Ubuntu, so let’s understand each of these steps one by one:...

Activate the swap file & finalize:

Step 1: Activate the swap file:...

How to Add Swap Space on Ubuntu 20.04 – FAQs

How do I check if my Ubuntu 20.04 system has swap space enabled?...

Conclusion

Swap files are handy when you are running full of physical RAM, in this article we have understood how we can create the swap file and also activate it so that whenever the Ubuntu system runs out of physical RAM then the system can easily use the swap file as memory, follow this article step by step to understand how you can create swap files in ubuntu....

Contact Us