Install Memtester on Ubuntu

How to Install Memtester on Ubuntu 22.04

This guide will demonstrate how to install and run Memtester on Ubuntu to check faults in memory. Read on to find out more!

Memtester – An Overview

Memtesters, the open-source memory testing tool, is a testing program used to check for memory faults. This program is designed to check RAM faults, read and write memory address patterns and check the errors. The Memtest program is installed by default in the Ubuntu systems. Also, this software enables the users to check memory for errors without rebooting the server. 

Memtester Memory Operations

Memtester performs a stress test to determine memory subsystem faults by using malloc() function to acquire the dynamic memory of the size mentioned as an argument with the memtester command. If the operation fails, it reduces the memory size and tries the testing again. 

Once it has acquired the dynamic memory, it performs the mlock() operation. That is, it blocks the access to that section of memory unless it is required by the CPU. However, if it does not block the memory, then the testing is slower and less effective. In addition, it can only mallock the memory if it is run as a root user or with sudo access.

The maximum amount of memory that the memtester can test cannot be greater than the amount of memory you have in the system. Furthermore, you must be careful while assigning the memory to memtester as the operating system, its libraries and current processes also take available memory.

Lastly, you must be aware of how much memory you want to assign to memtester. If you assign all the available memory, and it fails the operation, then the command will reduce the memory size and then try again. This will enable the command to again take over whatever memory is available. Hence, you won’t be able to run other applications if the maximum available memory is blocked by the memtester command. 

Memtester Command Options

  • The memtester command takes the following arguments:
  • -p PHYSADDR: physical address of the available memory
  • MEMORY: the amount of memory to allocate and test for faults
  • ITERATIONS: the number of times the command should iterate through the test


To run memtest86+ or memtest on Ubuntu, you only need Ubuntu installed on your system. In addition, you will need a root user access or sudo privilege to perform update and install operation. Also, ensure that the Memtester option is enabled from the GRUB menu. 

How to install Memtester in Ubuntu

Memtester is a default utility that you can access from the GRUB menu. In addition, there is a commonly used Memtester software, MemTest86+, which you can also use instead of Memtester. In this section, we will first look at the installation of MemTest86+. After that, we will discuss how to install and run the Memtester on Ubuntu. Follow the steps given below to use Memtester.

1. Update System Packages

Before installing any other package, it is crucial to update the system. First, open the terminal by pressing “Ctrl + Alt + T”. Alternatively, open the Terminal by selecting it from the Applications menu. Execute the commands given below to perform this task:

sudo apt update && sudo apt upgrade

The output should look something like this:

update system to install memtester

2. Install MemTest86+ on Ubuntu

Now, install MemTest86+ in your system. For this step, use the install command. Specifically, type:

sudo apt -y install memtest86+


Install Memtest on Ubuntu

Wait for the installation to complete. Once it is done, you are all set up to run the MemTest. 

3. Open the GRUB Menu

Since the class Memtester works without an operating system, this means you can use it from the GRUB menu. To access this menu, reboot the system. As soon as the reboot starts, hit the “Shift” key.

The GRUB menu will appear. From this list of given items, choose memtest86+ by using the arrow keys. After that, press the “Enter” key.

4. Choose Launch Mode for MemTest86+

Once you have selected the memtest86+, hit either the F1 or F2 key. The F1 key denotes the Fail-Safe mode, and the F2 key indicates the Multi-Threading mode. In this tutorial, we will run in the Fail-Safe mode. 

5. Run MemTest86+ and Check its Status

Hit the “Enter” key to run the memtest86+ application. Once it is running, you can check its status from the marked section. 

run Memtest86+

This screen also displays other test details, such as passed tests and the number of errors encountered in the process. These options are visible in this section of the screen:

Check memory for errors

6. Quit MemTest86+

To exit from the memtest86+, press the “Esc” key to return to the main booting screen. As soon as you press the “Esc” key, the control will transfer to the GRUB screen. From there, you can choose the operating system and continue with your work. 

7. Uninstall MemTest86+ on Ubuntu

If you no longer need memtest86+ to check memory status, you can uninstall it. To uninstall, use the uninstall command. To be specific, type:

sudo apt -y autoremove memtest86+

8. Install Memtester Utility on Ubuntu

Instead of using the memtest86+, you can also use Memtester, a command-line utility, to check for RAM errors. To install this utility, type:

sudo apt install memtester

The output should look something like this:

install memtester

Wait for the installation to complete. Once it is done, you can run the utility to scan the memory for errors.

9. Run Memtester on Ubuntu

To run Memtest, execute the command given below:

sudo memtester 200M 1

The syntax for this command looks something like this:

memtester <size> <number of iterations>

The size attribute represents the size of the memory you want to test. And the number of iterations denotes the number of passes the utility will perform to check for errors.

Also, the memtester selects the memory using the malloc system call. After that, it tries to lock the memory using the mlock system call for faster execution. 

Upon executing the command, you should get a similar output:

launch memtester

And that’s a wrap! In this guide, we have covered both the MemTest86+ software and the Memtester utility for memory tests. Furthermore, we have discussed how to install and launch Memtester and Memtest86+ on Ubuntu systems. Did it work for you? Do let us know in the comments. 

Learn more about memory management by reading about checking memory usage.

If this article helped you, please share it.

Leave a Reply
Related Posts