Linux

Checking RAM in Linux: Complete Guide to Memtest86+

This guide helps you detect hidden RAM errors in your Linux system. You'll learn to use Memtest86+, the gold standard for diagnostics, along with alternative utilities for quick checks. After running the tests, you'll get a clear report on your memory's health.

Updated at February 16, 2026
30-60 min
Medium
FixPedia Team
Применимо к:Ubuntu 22.04+Fedora 36+Debian 11+Arch LinuxAny system build with UEFI/BIOS

Introduction / Why This Is Needed

Random Access Memory (RAM) is one of the key components that affects the stability of the entire system. Hidden defects in RAM modules manifest non-obviously: random program crashes, "blue screens" (kernel panic), incorrect calculations, or data corruption without an apparent cause. Memtest86+ is the industry standard for low-level memory diagnostics, running directly on the hardware, bypassing the operating system. This guide will help you accurately determine if your RAM modules are healthy and identify a faulty one if present.

Requirements / Preparation

  1. Access to BIOS/UEFI: You need the ability to boot from an external medium (USB flash drive).
  2. Free USB Drive: At least 512 MB of free space.
  3. Another computer (optional): To write the image to the flash drive if your main system is unstable.
  4. Basic knowledge: Ability to enter BIOS/UEFI and select a boot device.

⚠️ Important: Before starting, close all programs and save important data to another medium. Although Memtest86+ does not harm data on disks, an unstable system may "crash" at any moment.

Step 1: Preparing a Bootable Memtest86+ USB Drive

The most reliable method is to use the official Memtest86+ image (free version). It requires no installation and works on any PC with x86/x64 architecture.

  1. Download the latest version from the official website. Select Memtest86+ USB Image.
  2. Write the image to the flash drive. Warning: this will erase all data on the flash drive!
    • On Linux (Ubuntu, Fedora, etc.):
      # Determine the flash drive's device name (e.g., /dev/sdX) using `lsblk` or `sudo fdisk -l`
      sudo dd if=/path/to/image.img of=/dev/sdX bs=4M status=progress && sync
      
      • Replace /dev/sdX with the correct device (e.g., /dev/sdb). Do not confuse it with your system disk!
    • On Windows use Rufus. In the "Write" section, select "Disk image (ISO)" and specify the downloaded .img file. In "Partition scheme," choose MBR for compatibility with older BIOS or GPT for UEFI (usually GPT for UEFI is suitable).

Step 2: Booting from the Drive and Starting the Test

  1. Insert the prepared flash drive into the problematic computer.
  2. Reboot it and immediately start pressing the key to enter BIOS/UEFI (most often Del, F2, F10, F12 — depends on the motherboard manufacturer).
  3. In the BIOS/UEFI settings, find the Boot or Загрузка section.
  4. Make your USB drive the first in the boot order (Boot Option #1).
  5. Save the settings (usually F10) and exit. The computer will reboot and load Memtest86+.

If done correctly, you will see a blue screen with the Memtest86+ logo and a test that starts automatically (Test #1).

Step 3: Interpreting the Results

Memtest86+ operates on a sequence of tests (Test 0-13). Each full pass (Pass) checks all memory. The status line at the bottom of the screen is critical:

Pass: 3  Errors: 0  ...
  • Pass: How many times all memory has been fully checked.
  • Errors: Total number of errors found.

Success criteria:

  • Minimum 4 passes (Pass >= 4) with Errors = 0 — memory is highly likely to be healthy.
  • Errors > 0 (even 1) — the RAM module(s) are faulty. You can stop the test (press Esc); further passes are unnecessary.

💡 Tip: For a quick initial check, 1-2 passes are sufficient. If there are no errors, you can consider the memory stable. If there are errors, look for the faulty module (see Step 5).

Step 4: Alternative Method — Stress Test from a Running Linux System (stress-ng)

If for some reason booting from a USB drive is impossible (e.g., on a laptop without BIOS access), you can perform an approximate test directly in Linux. It is less accurate because the OS can interfere, but it will reveal serious issues.

  1. Install the stress-ng utility:
    # For Ubuntu/Debian
    sudo apt update && sudo apt install stress-ng
    
    # For Fedora/RHEL
    sudo dnf install stress-ng
    
    # For Arch
    sudo pacman -S stress-ng
    
  2. Run a test that loads 90% of available memory for 30 minutes:
    stress-ng --vm 2 --vm-bytes 90% --timeout 30m --metrics-brief
    
    • --vm 2 — starts 2 processes to load memory.
    • --vm-bytes 90% — each process uses 90% of total RAM.
    • --timeout 30m — the test lasts 30 minutes.
    • --metrics-brief — outputs brief statistics.
  3. Evaluate the result:
    • If the command exits with code 0 (no errors) and the system did not freeze/reboot — there are likely no serious problems.
    • If the system freezes, reboots, or messages about oom-killer or hardware error appear in dmesg/journalctl — this is a warning sign.

⚠️ Important: This method does not replace Memtest86+, but it can serve as a quick check. Run it only if you are confident in power stability and disable all unnecessary programs.

Step 5: Isolating the Faulty RAM Module

If Memtest86+ shows errors, you need to find which specific memory module is at fault.

  1. Power off the computer and disconnect the power cable.
  2. Remove all RAM sticks except one. Ensure it is installed in the recommended slot (usually A2 or DIMM2, see the motherboard manual).
  3. Run Memtest86+ again with this single stick.
  4. Repeat the passes (minimum 4). If there are no errors — this stick is healthy. If errors appear — it is faulty.
  5. Test each stick sequentially in the same slot. If all sticks show errors in this slot, the problem may be the slot or memory channel.
  6. To test the slot: install a known working stick (e.g., one that passed the test) into the suspect slot and run the test. If errors appear — the slot on the motherboard is faulty.

Verifying the Result

  • Success (Errors = 0, Pass >= 4): Your RAM is physically intact. Issues with freezes/lockups most likely lie elsewhere: drivers, disk, CPU overheating, unstable overclock.
  • Failure (Errors > 0): You have found a faulty module or slot. Replace the RAM module immediately. Continuing to use defective memory will lead to silent data corruption, system crashes, and potential data loss.

Potential Issues

  • Memtest86+ does not see all memory: Ensure the Memory Remap Feature (or similar) option is enabled in BIOS/UEFI. Also check if part of the memory is disabled due to an iGPU setting (if integrated graphics are present).
  • Test passes, but Linux system is unstable: The problem may be in memory frequency/timings (XMP/DOCP). Try entering BIOS/UEFI and disabling the memory overclocking profile, reverting to standard settings (JEDEC).
  • False errors during CPU overclock: If you have overclocked the processor (core voltage, multiplier), this can affect the memory controller (integrated into the CPU on modern platforms). Before testing, revert the CPU and RAM to their stock frequencies.
  • No USB boot in UEFI: Secure Boot may be enabled in BIOS/UEFI. The free version of Memtest86+ is not signed, so temporarily disable Secure Boot for the test.
  • Failed to allocate memory error in stress-ng: Increase the timeout (--timeout 10m) or reduce the load (--vm-bytes 50%). Ensure the system has enough free RAM (check with free -h).

Additional Tools and Nuances

  • Memtest86+ (paid version): The official website offers a commercial version with native UEFI boot support (without BIOS compatibility) and extended diagnostics. The free version is sufficient for most users.
  • mprime (Mersenne Prime Test): Another stress test that heavily uses memory. Installation: sudo apt install mprime (Ubuntu). Run: mprime -t. Considered a very rigorous test.
  • Severity: Even a single bit error in RAM is a serious defect. Do not try to "live with it." The module should be replaced under warranty if it is still covered.
  • Testing laptops: In laptops, memory is often soldered. One error detected by Memtest86+ most likely indicates a faulty entire motherboard. Contact a service center.

Remember: memory diagnostics is a hardware test. No software running in a working OS can provide the same accuracy as Memtest86+.

F.A.Q.

Can I test RAM from within a running Linux system?
How long should a Memtest86+ test run?
Can a memory test produce a false positive?

Hints

Prepare a bootable USB with Memtest86+
Boot from the USB and start the test
Interpreting results
Alternative: Test from within Linux using stress-ng
Isolating the faulty module
FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community