Posts Tagged ‘dmesg’

How to get installed linux OS version

Friday, October 19th, 2007

Wondering how to get the Linux OS version installed on a server or PC? Here are some commands our system administrator taught me and wanted to share it with you.

Using dmesg command

[conai@myserver]$ dmesg | head -1
Linux version 2.6.15-1.2054_FC5smp (bhcompile@hs20-bc1-3.build.redhat.com)
(gcc version 4.1.0 20060304 (Red Hat 4.1.0-3)) #1 SMP Tue Mar 14 16:05:46 EST 2006

Using uname command

[conai@myserver]$ uname -a
 Linux dugong.mbsautomotive.com 2.6.15-1.2054_FC5smp #1 SMP Tue Mar 14 16:05:46 EST
2006 i686 i686 i386 GNU/Linux

Opening the /etc/issue file

[conai@myserver]$ cat /etc/issue
Fedora Core release 5 (Bordeaux)
Kernel \r on an \m

Opening the /proc/version file

[conai@myserver]$ cat /proc/version
 Linux version 2.6.15-1.2054_FC5smp (bhcompile@hs20-bc1-3.build.redhat.com)
(gcc version 4.1.0 20060304 (Red Hat 4.1.0-3)) #1 SMP Tue Mar 14 16:05:46 EST 2006

According to Rai and Mark, there are still other ways to do this but I think these are enough to get the information I need. Pick whatever suites your needs. Thank Rai and Mark for sharing this information with me.