What is the Linux command to find out hardware info?

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

Try lshw

It will suggest you run it as root, so try

sudo lshw

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 Ubuntu based distributions by default, and Debian in the main repo
  • 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
  • Check more on this page

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

I am a co-developer of a utility that is making its way into several distributions. The tool is called inxi. It is a bash script that does what all the other answers here suggest in one easy command. Check it out.

To use it, simply go to a terminal and type 'inxi -F' and it will display a full (-F) system information output. 'inxi -h' will show more options. It was originally made for IRC troubleshooting, so it works in almost every IRC client (and comes bundled in some).

inxi


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