I need to find out hardware information for the below items under Linux:

  • CPU (and cores)
  • CPU speed
  • Memory
  • Hard disks
  • OS version

Any advice?

link|improve this question
feedback

migrated from stackoverflow.com Jun 29 '11 at 15:44

This question came from our site for professional and enthusiast programmers.

7 Answers

From Linux Commands - A practical reference:

Show kernel version and system architecture

uname -a

Show name and version of distribution

head -n1 /etc/issue

Show all partitions registered on the system

cat /proc/partitions

Show RAM total seen by the system

grep MemTotal /proc/meminfo

Show CPU(s) info

grep "model name" /proc/cpuinfo

Show info about disk sda

hdparm -i /dev/sda
link|improve this answer
feedback

Try lshw

It will suggest you run it as root, so try

sudo lshw
link|improve this answer
you will need to install it in many cases - iirc it wasn't stock in ubuntu – Journeyman Geek Jun 29 '11 at 15:46
feedback

Here is a link to various Linux commands for what you want:

http://www.cyberciti.biz/tips/linux-command-to-gathers-up-information-about-a-linux-system.html

Specifically, you're looking for commands like:

cat /proc/cpuinfo

free -m

cat /proc/version
link|improve this answer
feedback

Here is a list of commands to check hardware on Linux. Note that not all commands are available on all distributions. It is better to launch then as root (or via sudo) to get all the information.

Command: lscpu

  • List available cpus and their caracteristics
  • Not available on older distribution

Command: lshal

  • Require HAL (Hardware Abstraction Layer) to be installed
  • List all hardware visible by HAL

Command: lshw

  • Available on Debian and Ubuntu based distributions by default
  • Available in the Fedora repositories
  • Uses many inputs to detect all hardware: Kernel, HAL, DMI, etc.
  • As a neat ‘-html’ switch that generates hardware reports

Command: lspci

  • Standard command
  • List all hardware connected to the PCI bus as detected by the kernel

Command: lsusb

  • Standard command
  • List all hardware connected to the USB buses as detected by the kernel

Command: dmidecode

  • Standard command
  • Get the source information from the DMI (a kind of BIOS interface)
  • List all hardware as reported by the DMI interface
link|improve this answer
feedback

If you want lots of information about all of the devices connected to your machine over the PCI (or PCI-Express) bus then type lspci -vvknnqq

If you want information about your disk partitioning then type sudo fdisk -l /dev/sda

link|improve this answer
feedback

You can also use dmidecode which will provide description of the systemâs hardware components.

link|improve this answer
feedback

This is a very basic Linux question which you can find by googling for answer. Type "lspci" in the terminal for hardware information.

link|improve this answer
Not very helpful answer. – bbaja42 Jun 29 '11 at 17:07
feedback

Your Answer

 
or
required, but never shown