How to Add Swap Space in Linux

If the swap space is not enough, you can add a new swap file to your server. Login as root user and then run the following commands to add 10GB of swap space:

You can verify if new swap space was added successfully:

If you want to remove the swap file, run the following commands:

If you want to add this swap space permanently, you need to include it in your /etc/fstab file. Edit the fstab file and add an entry that looks like this:

Please share
  •  
  •  
  •  
  •  
  •  
  •  

AWS Big Data Specialist. Oracle Certified Professional (OCP) for EBS R12, Oracle 10g and 11g. Co-author of "Expert Oracle Enterprise Manager 12c" book published by Apress. Awarded as Oracle ACE (in 2011) and Oracle ACE Director (in 2016) for the continuous contributions to the Oracle users community. Founding member, and vice president of Turkish Oracle User Group (TROUG). Presented at various international conferences including Oracle Open World.

Leave Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.