---
title: "What is Swap Space in Linux?"  
description: "What is Swap Space in Linux?"  
author: "Mukul Goenka"  
published: 2022-04-15  
canonical: https://answers.mindstick.com/qa/96816/what-is-swap-space-in-linux  
category: "troubleshooting"  
tags: ["troubleshooting", "linux"]  
reading_time: 1 minute  

---

# What is Swap Space in Linux?

What is [Swap Space](https://www.mindstick.com/forum/159075/what-s-the-difference-between-virtual-memory-and-swap-space) in Linux?

## Answers

### Answer by Hitesh Vohra

![What is Swap Space in Linux?](https://answers.mindstick.com/questionanswer/beda4129-9c81-472e-a2f1-e8829bc72e65/images/846f3f25-465c-4bc3-bf3e-6b2c8e7bdff7.jpeg)\

- The **[swap](https://www.mindstick.com/forum/34027/how-to-swap-the-values-of-two-columns-in-sql-server) [space](https://www.mindstick.com/articles/12954/do-your-electrical-repair-in-your-own-space)** is stored on the hard drive as a partition or a file. It is used by [**Linux**](https://answers.mindstick.com/qa/96810/what-is-linux) to increase the amount of RAM accessible to processes by saving infrequently used pages.
- During the installation of the operating system, we normally specify swap space. It can also be changed afterwards with the mkswap and swapon scripts.
- Swap space is hard disc space that serves as a substitute for physical memory. It's a type of virtual memory that stores process memory images. When our computer's physical memory runs out, it switches to virtual memory and saves information to disc.
- Swap space is a type of disc space that works as a memory expansion. When the system's physical memory (RAM) is full and more memory resources are required, it is used.

\

**Read More: [What is the difference between BASH and DOS in Linux?](https://answers.mindstick.com/qa/96817/what-is-the-difference-between-bash-and-dos-in-linux)**


---

Original Source: https://answers.mindstick.com/qa/96816/what-is-swap-space-in-linux

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
