Menu
The Tech Paper
  • Home
  • Interview Questions
    • PHP String Interview Question
    • PHP Array Interview Qutions
    • jQuery Interview Quetions
    • PHP Interviwe Question on php.ini file
    • htaccess File Interview Quetions
  • About
The Tech Paper

Create a swap memory in Linux

Posted on December 2, 2020December 2, 2020

Swap memory is like RAM, in Linux is used when the amount of RAM is full. If the system needs more memory resources and the RAM is full then, other inactive pages in RAM are moved to the swap memory. While swap space can help machines with a small amount of RAM. Swap memory creates by some part of Hard drive.

You need to install htop monitoring features for check memory uses.

Following commands will create 4 GB of swap memory:

  1. sudo swapon –show
  2. sudo fallocate -l 4G /swapfile
  3. sudo chmod 600 /swapfile
  4. sudo mkswap /swapfile
  5. sudo swapon /swapfile
  6. sudo nano /etc/fstab (add this line /swapfile swap swap defaults 0 0)
  7. sudo swapon –show
  8. htop

Categories

  • Docker
  • Git
  • Interview Questions
  • Laravel
  • Linux
  • php
  • Salesforce

Recent Posts

  • Nested / Cascade query in SOQL
  • Declarative tools in salesforce
  • SalesForce SU21 mind dumps
  • PHP Interview Question 2021
  • Ubuntu 20.04 Bluetooth not working [Resolved]

Archives

  • May 2022
  • September 2021
  • April 2021
  • January 2021
  • December 2020
  • September 2020
  • July 2020
  • January 2020
  • July 2019
  • August 2018
  • June 2018
  • April 2018
  • September 2017
  • June 2017
  • May 2017

Recent Posts

  • Nested / Cascade query in SOQL May 11, 2022
  • Declarative tools in salesforce September 24, 2021
  • SalesForce SU21 mind dumps September 24, 2021
  • PHP Interview Question 2021 April 24, 2021
  • Ubuntu 20.04 Bluetooth not working [Resolved] January 22, 2021

Contact Us

©2022 The Tech Paper | Powered by Abhinav Trivedi