Skip to content
Technology News Information & Jobs

Technology News Information & Jobs

Ubuntu Tutorials, Ubuntu How To , Linux Tips, Tech Jobs

  • Work with US
  • Search Jobs
  • Post a Job
  • Contact Us
  • Ubuntu
    • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • Themes
  • Linux
  • Laptops
  • Tutorials
  • Job Dashboard
  • Toggle search form
How To Add Swap Space On Ubuntu 22.04

How To Add Swap Space On Ubuntu 22.04 LTS

Posted on June 2, 2022 By admin No Comments on How To Add Swap Space On Ubuntu 22.04 LTS

How To Add Swap Space On Ubuntu 22.04

Swap space is the part of the HDD or SDD that is designed to help the operating system temporarily store data. The data or information that the OS cannot hold in RAM is stored in Swap space. It is useful when there is more load on RAM.

In this tutorial, we will see the steps to add swap space on Ubuntu 22.04 LTS.

How To Add Swap Space On Ubuntu 22.04

You can check if the Ubuntu already has some swap space available with the following command.

sudo swapon --show

You should get an output if you have swap space available other you won’t get any output. Now, you can create the swap space from the available HDD space or SDD space. Run the following command to see if there is any space available or not.

df -h

If you have 2 GB RAM then you can create 2 GB swap space accordingly. Run the following command to create swap file at first. You need to convert the swap file to swap space later.

sudo fallocate -l 2G /swapfile

You can verify that the correct amount of space was reserved by typing:

ls -lh /swapfile
-rw-r--r-- 1 root root1.0G Apr 25 11:14 /swapfile

Now, after creating the swap file, you need to turn this into swap space. Meanwhile, you need to change the file permission to the root level to prevent further modification from the users.

sudo chmod 600 /swapfile

 

READ More Relevant Stuff:  How To Install jq On Ubuntu 22.04 LTS

Verify the permissions change by typing:

ls -lh /swapfile
Output
-rw------- 1 root root 2.0G May 01 05:15 /swapfile

As you can see, only the root user has the read and write flags enabled.

Now run the following command to change the file as swap space by typing:

Sudo mkswap /swapfile

Now, run the following command to inform your system and let your system use it as a swap space.

sudo swapon /swapfile

You can verify that the swap is available by running the following command:

sudo swapon --show
Ubuntu 22.04

Post navigation

Previous Post: Fix driver irql_less_or_not_equal [2023]
Next Post: Install Deepin Desktop Environment On Ubuntu 22.04 LTS

Related Posts

How To Install Remmina On Ubuntu 22.04 LTS Jammy JellyFish How To Install Remmina On Ubuntu 22.04 LTS Jammy JellyFish How To Ubuntu
How To Install Vim On Ubuntu 22.04 LTS How To Install Vim On Ubuntu 22.04 LTS Tutorials
How To Install Microsoft Teams On Ubuntu 22.04 LTS And Other Linux How To Install Microsoft Teams On Ubuntu 22.04 LTS And Other Linux Linux
Finding APT Packages That Occupy The Most Disk Space On Debian/Ubuntu Linux Finding APT Packages That Occupy The Most Disk Space On Debian/Ubuntu Debian
How To Access Google Drive on Ubuntu 22.04 How To Access Google Drive On Ubuntu 22.04 LTS Tutorials
How To Install Nvidia Drivers On Ubuntu 22.04 LTS How To Correctly Install Uninstall Linux Ubuntu Nvidia Drivers Fast Ubuntu

Leave a Reply Cancel reply

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

Recent Posts

  • How To Enable Hibernate in Ubuntu 22.04 LTS May 20, 2024
  • Popular Ubuntu Games: Top 5 Games To Play March 17, 2024
  • WordPress | Your site doesn’t include support for the “generateblocks/container” block GenerateBlocks Plugin February 11, 2024
  • Ubuntu Autoremove Command Debian Autoremove Command February 10, 2024
  • How To Mount Windows 11 Shares on Debian Linux December 7, 2023
  • Anonymous Browsing 101: A Deep Dive Into Residential Proxies November 20, 2023
  • How To Correctly Install Uninstall Linux Ubuntu Nvidia Drivers Fast October 31, 2023
  • Ethical Web Design: The Dos and Don’ts October 28, 2023
  • Understanding the Role of Security Operations Center October 25, 2023
  • The Positive Effects of AI Tools and Online Services on Students Successful Essay-Writing Skills October 3, 2023
  • Linux Wget Examples September 27, 2023

Categories

  • Android
  • Apple
  • Blogs
  • Debian
  • Fix
  • Gadgets
  • Game
  • Google
  • How To Ubuntu
  • Internet
  • Laptops
  • Linux
  • Linux Commands
  • Linux Game
  • Linux Mint
  • News
  • Operating Systems
  • Security
  • Technology
  • Themes
  • Tools
  • Tutorials
  • Ubuntu
  • ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • Windows 11
  • Wordpress
  • Search Jobs
  • Post a Job
  • Job Dashboard
  • Contact Us
  • About US
  • Cookie Policy
  • Terms and Conditions
  • Privacy Policy
  • Sitemap
  • Write For US

Tags

android apps centos ChatGPT command Commands Debian deepin Desktop docker Fedora fix game games Gaming gnome google kernel linux linux commands linux kernel Linux laptops Linux Mint Linux themes minecraft NVIDIA Python Raspberry Pi sysadmin themes ubuntu ubuntu 18.04 Ubuntu 18.04 LTS Ubuntu 20.04 ubuntu 20.04 lts Ubuntu 22.04 LTS Ubuntu games Ubuntu kernel ubuntu themes ubuntu tutorial VirtualBox Windows Windows 11 Wine WSL
itsubuntu.com is an Equal Opportunity Employer. For Advertisement, Jobs, Guest posts, and any other thoughts, email us at [email protected]
  • Specification Writer

    • Montgomery, AL
    • PANGEATWO
    • Full Time
  • Entry Writer

    • Wood Dale, IL
    • TOP Group - Japanese Recruiting Agency
    • Full Time
  • Technical Writer

    • Atlanta, GA
    • Visionaire Partners
    • Full Time
  • Customs Brokerage Entry Writer

    • Chicago, IL
    • ALS Recruiting Ltd
    • Full Time
  • Customs Broker – Entry Writer

    • Schaumburg, IL
    • LaSalle Network
    • Full Time
  • Technical Writer

    • North Haven, CT
    • Insight Global
    • Full Time
  • Data Engineer, Global IT Business Intelligence

    • Collierville, TN (Remote)
    • The Juice Plus+ Company
    • Full Time
  • Service Writer

    • Elmhurst, IL
    • IN DEMAND Recruitment & Consulting Inc.
    • Full Time

Copyright © 2025 Technology News Information & Jobs.

Powered by PressBook Grid Blogs theme