So, you finally decided to switch to Linux from Windows. You search the internet for tutorials, and halfway through the installation process, you hear about the term “Linux Swap,” wonder what it is, and one search on the internet brought you to this article. Let’s look at Swap Space is in Linux and if it’s essential or not.
What is Swap in Linux?
Swap is similar to the memory expansion feature on smartphones recently made available by some manufacturers. In a nutshell, it uses the phone’s internal storage like RAM if the actual RAM runs out of space. Similarly, on Linux, Swap space keeps your computer from crashing by storing volatile data on its internal memory (HDD/SSD) if your physical RAM is full.
Creating Swap space is unnecessary to install Linux, but if your computer has less RAM and more storage space, you can salvage some to make some swap space as it might come in handy in some situations.
How much Swap is too much Swap?
So, if your computer has the characteristics that we mentioned above, it’s not a bad idea to create swap space, but the question is, how much should you create?
There’s certainly no limit to how much Swap you can create, but the common opinion is “Half the size of your RAM.” However, create Swap only if you’re sure that you will run memory-hogging programs and do lots of multi-tasking, or else you’ll essentially be wasting your storage space which you could have used to store something else.
How to create Swap in Linux?
Considering you’re already in the installer and created / and /home partitions, the next step would be creating swap space. All you need to do is create an empty partition of size depending on how much RAM you have (Minimum 2GB to 4GB of swap space if you have 8GB RAM). In the options, select “use it as swap” or any word that correlates to Swap and click on create. You can then go ahead with the installation process.
To make things easier, we have an article explaining how to dual-boot Linux Mint alongside Windows, where we’ve explained how to create Swap. So, make sure to check it out.
Do you have a swap partition installed in your Linux? Let us know in the comments section below.
If you like this simple explainer, check out our Short Bytes section. We take complex tech topics and break them into short, easy-to-understand articles.