How to test RAM in Linux

A defective RAM, or memory, can make your computer run slower than usual. If you are using the Linux operating system and suspect that your RAM is not working properly, you can use the "memtester" utility. The utility will test the memory effort directly from the operating system. Memtester must be run as the root user, so the memory must be closed before being tested. The utility's exit code will tell you if the memory is working properly, or it will return a code that tells you that part of the test has failed.

Steps to follow:

one

Open a terminal window or Konsole. The Terminal and the Konsole programs can be found in the main program menu or the right button on the desktop.

two

Type the "memtester" command to check if the memtester utility is installed on the computer.

3

Install the memtester utility from the software repository, if it is not already installed. Users of Ubuntu and Linux Mint type "sudo apt-get install memtester" on the command line. Type Fedora users type "yum install memtester" on the command line.

4

Enter the command "su -" to become the root user. Ubuntu and Linux Mint users type "sudo" immediately before the memtester command.

5

Write the "memtester 100 5" command to test the memory. Replace "100" with the size, in megabytes, of the RAM installed in the computer. Replace "5" with the number of times you want to run the test.

6

Enter the command "echo $?" to show the exit code when you see a new command prompt. If the output is "0", the memory works correctly. The other possible results are: x01: Memory allocation or blocking error, or invocation of errorx02: Error during the address test of pastex04: Error during one of the other tests.

7

Enter the command "exit" to close the root session.