Linux Command To Find the System Configuration And Hardware Information
in BASH Shell, CentOS, Debian / Ubuntu
What is the command to find the system configuration on Linux operating system using command line (text) mode?
On Linux based system most of the hardware information can be extracted from /proc file system, for example display CPU and Memory information, enter:
cat /proc/meminfo
cat /proc/cpuinfo
The following list summarizes commands to get various hardware from the system:
Linux cpu/hardware informationUse any one of the following command:
# less /proc/cpuinfo
OR
# lscpu
Linux show free and used memory in the systemUse any one of the following command:
# cat /proc/meminfo
OR
# free
# free -m
# free -mt
# free -gt
Linux find out the current running kernel versionType the following command:
# cat /proc/version
Sample outputs:
Linux version 3.2.0-43-generic (buildd@batsu) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #68-Ubuntu SMP Wed May 15 03:33:33 UTC 2013
OR use
# uname -mrs
# uname -a
Find out information about the Linux distribution and version# lsb_release -a
Sample outputs:
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.2 LTS Release: 12.04 Codename: precise
OR use the following command:
$ cat /etc/*release*
Sample outputs:
Red Hat Enterprise Linux Server release 6.4 (Santiago)
List all PCI devices # lspci
List all USB devices # lsusb
List all block devices (hard disks, cdrom, and others) # lsblk
Dump all hardware informationType the following command to see your motherboard, cpu, vendor, serial-numbers, RAM, disks, and other information directly from the system BIOS:
# dmidecode | less
in BASH Shell, CentOS, Debian / Ubuntu
What is the command to find the system configuration on Linux operating system using command line (text) mode?
On Linux based system most of the hardware information can be extracted from /proc file system, for example display CPU and Memory information, enter:
cat /proc/meminfo
cat /proc/cpuinfo
The following list summarizes commands to get various hardware from the system:
Linux cpu/hardware informationUse any one of the following command:
# less /proc/cpuinfo
OR
# lscpu
Linux show free and used memory in the systemUse any one of the following command:
# cat /proc/meminfo
OR
# free
# free -m
# free -mt
# free -gt
Linux find out the current running kernel versionType the following command:
# cat /proc/version
Sample outputs:
Linux version 3.2.0-43-generic (buildd@batsu) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #68-Ubuntu SMP Wed May 15 03:33:33 UTC 2013
OR use
# uname -mrs
# uname -a
Find out information about the Linux distribution and version# lsb_release -a
Sample outputs:
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.2 LTS Release: 12.04 Codename: precise
OR use the following command:
$ cat /etc/*release*
Sample outputs:
Red Hat Enterprise Linux Server release 6.4 (Santiago)
List all PCI devices # lspci
List all USB devices # lsusb
List all block devices (hard disks, cdrom, and others) # lsblk
Dump all hardware informationType the following command to see your motherboard, cpu, vendor, serial-numbers, RAM, disks, and other information directly from the system BIOS:
# dmidecode | less