Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Are there any Linux tools (command line, or Live CD) that will test hardware components for errors (hard drive, RAM, CPU, graphics card, buses) and show me some detailed output with wrong parts etc.?

share|improve this question

There are many tools that specialise in testing different components. No all-in-one tool does currently come to my mind. (Also, if it exists and does not internally use any of the well-established tools, that would be stepping against the principle of modularity, which is one of the fundamentals of Unix philosophy.

  • For RAM testing, I recommend Memtest86+. You have to boot into it rather than your primary system (pretty obvious if you consider the role of memory to a running OS).

  • For hard drive testing, you can try:

    • smartmontools to check the hardware "health" state of your drive,
    • Testdisk if you need to recover partition structure.

I don't recall any generic tools for testing components such as CPU or a graphics card.

As a general tip, I recommend using a specialized live distribution such as SystemRescueCd, that is released specifically as a tool for resolving major system problems.

share|improve this answer
How does the output of Testdisk look like? I have read that it's for data recovery. I would rather diagnose if the sectors, cylinders, tracks, MBR etc. is all right, what looks bad etc. – xralf Dec 9 '11 at 15:45
You mix a couple of things here, but I see your point. Sectors, cylinders and tracks refer are very old nomenclature that don't have consistent representation in today's hardware. They are used in some places mainly for the comfort of old-school admins. But since I see that you're mainly interested in hardware-related issues, I'll add something to the answer. – rozcietrzewiacz Dec 9 '11 at 16:12
BTW, if you need to check the drive for bad sectors, the best way to go is to download a bootable version of diagnostic tools released by the hard drive manufacturer. And if you can't find such, or really want to go with a generic tool, there is one contained on the SysRescueCD: MMHD (a bootable image). – rozcietrzewiacz Dec 9 '11 at 16:24

For memory, there is Memtest86, though it is not strictly to be considered a Linux tool:

Memtest86 is designed to run as a stand-alone, self-contained program from a bootable floppy disk, CD-ROM, USB Drive, or from a suitable bootloader without an operating system present.

But as

Popular Linux distributions such as Knoppix and Ubuntu offer an option when the CD starts to run Memtest immediately (instead of booting Linux)

you might already have it lying around. Some distributions also package it so you can install it conveniently and start via grub.

share|improve this answer
I'm mainly interested in tools for harddrive, but best would be know something for every hardware component in the system. I was afraid to ask 6 questions (not sure if community would tolerate 6 similar questions) – xralf Dec 9 '11 at 15:19
I am not sure if asking such 6 questions wouldn't be actually more appropriate. But we'll see how the moderators and other gurus respond to this one :) – rozcietrzewiacz Dec 9 '11 at 16:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.