Are you running out of usable memory on your Linux PC? Are you trying to free up RAM space but don’t know how to do it? We can help! Follow along as we go over how to free up RAM on Linux!
Method 1 – Htop
Htop is a command-line task management tool that uses text characters to generate graphics. It’s an incredibly lightweight tool and perfect for managing programs on Linux. It also happens to be the number 1 best way to free up RAM space.
Htop comes pre-installed on a few Linux operating systems, but not all. To check and see if it is set up on your Linux PC, run the htop command in a terminal. If nothing happens, follow the instructions below to get the app installed.
On Ubuntu, install the Htop app with the Apt command below.
sudo apt install htop
If you’re using Debian, set up the Htop app using the Apt-get command below.
sudo apt-get install htop
On Arch Linux, you can install the Htop app with Pacman.
sudo pacman -S htop
Running Fedora Linux? Install the Htop app using the Dnf command.
sudo dnf install htop
For OpenSUSE, the Htop app can be installed using the Zypper command.
sudo zypper install htop
Htop is found on a wide variety of Linux operating systems. To get it working on your computer, search for the “htop” package and install it the way you typically install packages.
After setting up Htop, return to the terminal window. Once in the terminal, execute the htop command to start up the Htop manager. However, be sure to run the sudo command in front of it to have full system access.
Once inside of the Htop tool, press the F6 key on the keyboard to open up the “SortBy” menu. Then, (using arrow keys and the Enter button) select “PERCENT_MEM” to sort running processes by amount of RAM used.
With everything sorted by memory (with the most used at the top), use the arrow keys to select the app(s) you wish to kill to free up RAM. Then, when you’ve made the selection, press the F9 key to open up the “Kill” menu.
Inside of the “Kill” menu, sort through the list for “SIGKILL,” and press the Enter key to terminate the process. Repeat this process as much as needed to free up as much RAM as desired.
Method 2 – XFCE Task Manager
If the terminal isn’t for you, another great way to clear up RAM on Linux is with the XFCE task manager. It’s a lightweight app that is incredibly easy to use. Although designed for the XFCE 4 desktop, it works on any system and any desktop environment.
Installing XFCE Task Manager
The XFCE task manager is compatible with every Linux operating system that supports the XFCE 4 desktop environment (which is about 99% of them). To start the installation of the app, open up a terminal window. Sadly, the command-line is required to install this program.
Once the terminal window is open on the Linux desktop, follow the command-line installation instructions outlined below that corresponds with the Linux operating system you currently use.
On every release of Ubuntu, you can install the XFCE task manager on your computer using the following Apt command.
sudo apt install xfxfce4-taskmanager
If you’re using Debian, the XFCE task manager is installable with the following Apt-get command.
sudo apt-get install xfce4-taskmanager
The XFCE task manager is available to all Arch Linux users in the “Extra” software repository. To install the app, ensure you have the “Extra” repo enabled in your
Pacman.conf file. Then, re-sync Pacman and install the app with the Pacman command below.
sudo pacman -S xfce4-taskmanager
Fedora users can install the XFCE task manager on their system by making use of the following Dnf command.
sudo dnf install xfce4-taskmanager
Are you using OpenSUSE Linux? Install the latest release of the XFCE task manager using Zypper.
sudo zypper install xfce4-taskmanager
The XFCE task manager is available on 99.9% of all Linux operating systems. To get it working, search for “xfce4-taskmanager” and install it the way you typically install packages on your computer.
Once the XFCE task manager is installed, launch it by pressing Alt + F2 on the keyboard, entering xfce4-taskmanager in the launch box, and pressing Enter to launch it.
With the app open, look to the “RSS” tab. RSS shows memory usage for each program. Click on the “RSS” menu to sort from most memory used to lowest (or click it again to go low to high).
After sorting by most used in memory, look through the list for programs you wish to close to free up RAM. Then, right-click on the program(s) you wish to kill and select the “Terminate” option to close the program.
You should see your “Memory” graph in the top right go down as you terminate apps, indicating RAM usage is going down.