This page shows you how to find info about linux or your machine, such as the linux kernel version number, linux distro version, CPU type and clock speed, RAM installed, storage device size, …. This page assumes Ubuntu. If your distro is not Ubuntu, some distro-specific info may have different command.
How to find linux kernel version?
On a terminal, type uname -a. Sample output:
Linux xah-Hypatia 3.0.0-24-generic #40-Ubuntu SMP Tue Jul 24 15:36:59 UTC 2012 i686 i686 i386 GNU/Linux
CYGWIN_NT-6.1-WOW64 h3-HP 1.7.16(0.262/5/3) 2012-07-20 22:55 i686 Cygwin
Is my Linux kernel 32 bits or 64 bits?
Type getconf -a | grep LONG_BIT
How to find the linux distro name and version?
On a terminal, type cat /etc/lsb-release. Sample output:
DISTRIB_ID=Ubuntu DISTRIB_RELEASE=11.10 DISTRIB_CODENAME=oneiric DISTRIB_DESCRIPTION="Ubuntu 11.10"
See also: man lsb_release.
“lsb” stands for Linux Standards Base. Some distro do not support this. (thx to Aaron Coakley)
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 your hard disk storage size and free space?
On a terminal, type df -H. The “-H” is for human readable, using G and M abbrevs for 10^6 and 10^3. Sample outputs:
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