How to Increase and Free Up Swap Memory in Ubuntu Linux Easily? (Example)

Everyone likes to download things online, that’s something we fully specialize in in the 21st century. But most never take into account how much space the computer has left until it’s too late, that’s why Today you will learn how to increase and release the Swap memory in Ubuntu Linux.

And is that Linux not only offers advantages for its free software, but also gives the opportunity to manage memory (real and virtual), so that you can download what you want without overdoing it. Allowing all its users to perform functions such as cleaning the storage space whenever they want and even allowing you to format or format an SD card.

Increase and free up Swap memory in Ubuntu Linux

The first thing you will learn will be to increase swap memory space. For those who do not know what this memory is, they should know that it is basically the virtual memory space, it uses the space included in the storage unit unlike the real one.

You may also be interested in:

When the latter is finished or reaches its limit, the computer copies part of the content in virtual memory, so that it can continue to function normally (this process is carried out by all operating systems, since you can configure and increase virtual memory in Windows if you want it too).

In order to increase and free Swap memory in Ubuntu Linux there are many methods, but the easiest (when it comes to increasing) is adding a swap file, To achieve this you have to do the following:

orange original ubuntu icon

First determine the size of the new swap file to be created. Choose the one you want and then multiply it by 1024, for example if the size of the block is 64MB it would be 65536.

At a Shell command prompt such as root put the command dd if = / dev / zero of = / swapfile bs = 1024 count = 65536 where count will be the size of the swap block.

Then configure the swap file with the following command mkswap / swapfile, once done you must use another command that would be swapon / swapfile, the latter is used to activate the file at that time but not automatically when starting the computer.

If instead what you want is to activate it when it starts edit / etc / fstab so you can include / swapfile swap swap defaults 0 0. This will make the new swap file that you have placed be activated every time the system starts (this is the most recommended).

Free up space

With the above, the first part of how to increase and free up Swap memory in Ubuntu Linux, the second part of logic is learning to free up space.

This can also be done with commands from a terminal, it will even allow you to see how much memory is being used before cleaning it.

To do the latter you must go to the terminal and place the following command: cat / proc / swaps, which will return a message with the memory size and the space that is in use, in addition to indicating where the partition is located.

Once you have read everything, run the command: swapoff -a && swapon -a, this will make the space that is in use go down to 0, that is, the swap memory will have been cleaned.

With this you already know what is necessary to increase and free the Swap memory in Ubuntu Linux. It is recommended that you ask for help if you are not an expert in this type of topic, since any mistake can be expensive for your team (in addition to that there are many more methods which are more complicated).

penguin and cards

In conclusion, it should be noted how good it is to use an operating system such as Linux, which gives you the freedom through commands to edit the parts you want on your PC. For example, you can update the Ubuntu system to the latest version from the terminal, and even repair broken or incorrectly installed packages, so learning about this should be your next step.

How useful did you find this content?

Click on a star to rate!

Average score 0 / 5. Counting of votes: 0

So far, no votes. Be the first to rate this content.

I'm sorry this content was not useful for you!

Let me improve this content!

Tell me, how can I improve this content?

You may also be interested in:

Deja un comentario