Linux: Get System Info

By Xah Lee. Date: . Last updated: .

Find Linux Kernel Version

uname -a
Print operating system info.
linux terminal uname 2016-05-10
uname -a

Find Linux Distro Name and Version

cat /etc/lsb-release

~ $ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS"

See also: man lsb_release. “lsb” stands for Linux Standard Base. Some distro do not support this.

Find CPU is 32 Bits or 64 Bits

show if the machine is 32 bits or 64 bits

getconf LONG_BIT

How Much RAM Installed

# show how much RAM installed
cat /proc/meminfo
MemTotal:        5937800 kB
MemFree:         3344824 kB
Buffers:          579436 kB
Cached:          1130528 kB
SwapCached:            0 kB
Active:          1540120 kB
Inactive:         850112 kB
Active(anon):     607436 kB
Inactive(anon):    79140 kB
Active(file):     932684 kB
Inactive(file):   770972 kB
Unevictable:           0 kB
Mlocked:               0 kB
HighTotal:       5115592 kB
HighFree:        3278656 kB
LowTotal:         822208 kB
LowFree:           66168 kB
SwapTotal:       6027260 kB
SwapFree:        6027260 kB
Dirty:                72 kB
Writeback:             0 kB
AnonPages:        680272 kB
Mapped:           105856 kB
Shmem:              6304 kB
Slab:             149900 kB
SReclaimable:      67808 kB
SUnreclaim:        82092 kB
KernelStack:        3168 kB
PageTables:         7636 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     8996160 kB
Committed_AS:    2692872 kB
VmallocTotal:     122880 kB
VmallocUsed:       17248 kB
VmallocChunk:      65456 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:        8184 kB
DirectMap2M:      905216 kB

Find CPU model

2 ways.

Here's lscpu output:

lscpu

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             AuthenticAMD
CPU family:            16
Model:                 5
Model name:            AMD Athlon(tm) II X4 645 Processor
Stepping:              3
CPU MHz:               800.000
CPU max MHz:           3100.0000
CPU min MHz:           800.0000
BogoMIPS:              6199.70
Virtualization:        AMD-V
L1d cache:             64K
L1i cache:             64K
L2 cache:              512K
NUMA node0 CPU(s):     0-3
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save
~/web/xahlee_info/linux $
# show CPU info
cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 5
model name      : AMD Athlon(tm) II X4 645 Processor
stepping        : 3
cpu MHz         : 3098.061
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 fxsr_opt 3dnowext 3dnow up extd_apicid pni monitor cr8_legacy
bogomips        : 6196.12
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management:

Find GPU Model

Type

lspci -v

and look for VGA or ATI or NVIDIA.

The “lspci” command lists all PCI devices.

sample output

◆ lspci

00:00.0 Host bridge: Advanced Micro Devices [AMD] RS880 Host Bridge
00:01.0 PCI bridge: Advanced Micro Devices [AMD] RS780/RS880 PCI to PCI bridge (int gfx)
00:0a.0 PCI bridge: Advanced Micro Devices [AMD] RS780/RS880 PCI to PCI bridge (PCIE port 5)
00:11.0 SATA controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode]
00:12.0 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:12.1 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0 USB OHCI1 Controller
00:12.2 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:13.0 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:13.1 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0 USB OHCI1 Controller
00:13.2 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:14.0 SMBus: Advanced Micro Devices [AMD] nee ATI SBx00 SMBus Controller (rev 3c)
00:14.2 Audio device: Advanced Micro Devices [AMD] nee ATI SBx00 Azalia (Intel HDA)
00:14.3 ISA bridge: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 LPC host controller
00:14.4 PCI bridge: Advanced Micro Devices [AMD] nee ATI SBx00 PCI to PCI Bridge
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor HyperTransport Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Miscellaneous Control
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Link Control
01:05.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RS880 [Radeon HD 4200]
01:05.1 Audio device: Advanced Micro Devices [AMD] nee ATI RS880 HDMI Audio [Radeon HD 4200 Series]
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 05)

Disk Size and Free Space

List USB Devices

# show USB devices
xinput
linux xinput output 2017 04 19

(2012-04-28 thanks to Aaron Coakley)