Linux: How to Find System Info

By Xah Lee. Date: . Last updated: .

How to find Linux kernel version?

On a terminal, type uname -a.

linux terminal uname 2016-05-10
uname -a

sample output:

Linux xah-p6813w 3.13.0-88-generic #135-Ubuntu SMP Wed Jun 8 21:10:42 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

How to find the Linux distro name and version?

On a terminal, type cat /etc/lsb-release. Sample output:

~ $ 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.

How to find 32 bits or 64 bits?

Type getconf LONG_BIT

This will tell you if your linux is 32 bits or 64 bits.

How to find out how much RAM installed?

Type cat /proc/meminfo

Sample output:

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

How to find CPU info?

On a terminal, type cat /proc/cpuinfo. Sample output:

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:

another sample, from a 2005 laptop:

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 13
model name      : Intel(R) Pentium(R) M processor 1.60GHz
stepping        : 6
cpu MHz         : 600.000
cache size      : 2048 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr mce cx8 mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss tm pbe up bts est tm2
bogomips        : 1196.13
clflush size    : 64
cache_alignment : 64
address sizes   : 32 bits physical, 32 bits virtual
power management:

How to find what GPU i have?

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)

How to find your hard disk storage size and free space?

On a terminal, type df -H. The “-H” is for human readable in metric unit. (k = 10^3, M = 10^6, G = 10^9.)

df -H

Filesystem             Size   Used  Avail Use% Mounted on
/dev/sda1              7.7G   7.1G   154M  98% /
udev                   403M   4.1k   403M   1% /dev
tmpfs                  164M   779k   164M   1% /run
none                   5.3M      0   5.3M   0% /run/lock
none                   410M   144k   410M   1% /run/shm
web                    989G   294G   695G  30% /media/sf_web
/dev/sr0                53M    53M      0 100% /media/VBOXADDITIONS_4.1.22_80657

Another example from Cygwin on Windows:

df

Filesystem     1K-blocks      Used Available Use% Mounted on
C:/cygwin/bin  964955132 288500876 676454256  30% /usr/bin
C:/cygwin/lib  964955132 288500876 676454256  30% /usr/lib
C:/cygwin      964955132 288500876 676454256  30% /
C:             964955132 288500876 676454256  30% /cygdrive/c
D:              11702268  10272672   1429596  88% /cygdrive/d

How to find out what mouse i have?

Type xinput.

◆ xinput
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                   	id=9	[slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                   	id=10	[slave  pointer  (2)]
⎜   ↳ Microsoft Microsoft® SideWinder™ X3 Mouse	id=13	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Power Button                            	id=7	[slave  keyboard (3)]
    ↳ Microsoft LifeChat LX-3000              	id=8	[slave  keyboard (3)]
    ↳ TrulyErgonomic.com Truly Ergonomic Computer Keyboard	id=11	[slave  keyboard (3)]
    ↳ TrulyErgonomic.com Truly Ergonomic Computer Keyboard	id=12	[slave  keyboard (3)]

( thanks to Aaron Coakley)