> ## Content Index
> Fetch the complete content index at: https://www.techloy.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# VIDEO: How to Change Swappiness in Ubuntu
- URL: https://www.techloy.com/video-how-to-change-swappiness-in-ubuntu/
- Published: 2025-06-27T17:03:24.000Z
- Updated: 2025-08-07T15:05:49.000Z
- Description: Is Ubuntu feeling sluggish? The fix might be as simple as changing one number.
- Author: Oyinebiladou Omemu
- Tags: / Tech Guide, Ubuntu Linux, Videos

Let’s talk about your computer’s memory, specifically, how [Ubuntu](https://www.techloy.com/tag/ubuntu-linux/) manages it. When your system runs out of RAM (the fast, short-term memory your apps use), it starts moving less important data to the SWAP space (a slower backup area on your disk). 

By default, Ubuntu sets swappiness to 60 (on a scale of 0 to 100), meaning it’s pretty aggressive about swapping data to disk. But the thing is, RAM is way faster than even the quickest SSD**.** So, if your system is constantly shuffling data in and out of swaps, things can slow down. 

That’s why many users tweak this setting, especially if they have plenty of RAM (say, 8GB or more). Lowering swappiness (to say, 10) tells Ubuntu to onlyuse swap when necessary, resulting in a snappier system.

[HOW TO: Check Your Laptop’s Battery Health on UbuntuUbuntu’s hidden battery health checker reveals exactly how much life your laptop battery has left, and here’s how to use it.![](https://storage.ghost.io/c/c1/a6/c1a6d111-d951-41ad-a392-c1e841210b93/content/images/icon/techloy-avatar-1-2467.png)TechloyOyinebiladou Omemu![](https://storage.ghost.io/c/c1/a6/c1a6d111-d951-41ad-a392-c1e841210b93/content/images/thumbnail/photo-1599153066743-08810dc8a419)](https://www.techloy.com/how-to-check-your-laptops-battery-health-on-ubuntu/)

## How to Change Swappiness in Ubuntu

#### **Step 1: Check Your Current Swappiness Value**

Open a terminal and run:

`cat /proc/sys/vm/swappiness`

This shows your current setting (likely 60, if you've never changed it).

![](https://storage.ghost.io/c/c1/a6/c1a6d111-d951-41ad-a392-c1e841210b93/content/images/2025/06/image-258-1.png)

#### **Step 2: Edit the Configuration File**

Let’s make the change permanent. Open the config file with (enter your password after the command):

`sudo nano /etc/sysctl.conf`

![](https://storage.ghost.io/c/c1/a6/c1a6d111-d951-41ad-a392-c1e841210b93/content/images/2025/06/image-260-1.png)

Video Script & Editing: [Kelechi Edeh](https://www.techloy.com/author/kelechi/) / Techloy.com | Content Research: [Oyinebiladou Omemu](https://www.techloy.com/author/oyinebiladou/) / Techloy.com

#### **Step 3: Adjust the Swappiness Value**

Scroll to the bottom and find `vm.swappiness`. If it exists, change its value to 10\. If not, add this line:

vm.swappiness=10

![](https://storage.ghost.io/c/c1/a6/c1a6d111-d951-41ad-a392-c1e841210b93/content/images/2025/06/image-261-1.png)

#### **Step 4: Save and Apply Changes**

In **nano**, press:` Ctrl + X` → `Y` → `Enter` to save. Then reboot the system when you're done.

If you don't want to reboot, you can apply the changes directly by entering:

`sudo sysctl -p`

![](https://storage.ghost.io/c/c1/a6/c1a6d111-d951-41ad-a392-c1e841210b93/content/images/2025/06/image-268-1.png)

#### **Step 5: Verify the Change**

Check the active value again:

`cat /proc/sys/vm/swappiness`

It should now say 10.

![](https://storage.ghost.io/c/c1/a6/c1a6d111-d951-41ad-a392-c1e841210b93/content/images/2025/06/image-262-1.png)

### **Conclusion**

You don't necessarily have to change your swappiness, but if you’re on a low-RAM system (like 4GB or less), keeping swappiness too low might cause crashes when RAM fills up. 

But for most modern machines with 8GB+ RAM, 10 is a decent spot; it keeps your system fast by minimizing unnecessary disk swaps. If you want to experiment, try values between 10–30 and see what feels best. 

*Image credit: Oyinebiladou Omemu / Techloy.com*

[VIDEO: How to Change Your Default Browser on UbuntuSwitching your default browser on Ubuntu is easier than you think, here’s how to do it in just a few clicks.![](https://storage.ghost.io/c/c1/a6/c1a6d111-d951-41ad-a392-c1e841210b93/content/images/icon/techloy-avatar-1-2473.png)TechloyOyinebiladou Omemu![](https://storage.ghost.io/c/c1/a6/c1a6d111-d951-41ad-a392-c1e841210b93/content/images/thumbnail/How-to-change-your-default-browser-on-Ubuntu-1.png)](https://www.techloy.com/video-how-to-change-your-default-browser-on-ubuntu/)