Tuesday, October 6, 2015

checking OS and karnel version in linux

There Linux command to check the Karnel version and detecting OS.

If you want kernel version information,use uname command

$ uname -a
Linux localhost 2.6.18-371.3.1.el5PAE #1 SMP Thu Dec 5
13:29:20 EST 2013 i386 GNU/Linux 
 If you want distribution information, it will vary depending on your distribution. You can try following options

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu Sauc
Release:    13.10
Codename:   saucy

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.10
DISTRIB_CODENAME=saucy
DISTRIB_DESCRIPTION="Ubuntu"

$ cat /etc/issue.net
Ubuntu Saucy Salamander (development branch)

$ cat /etc/debian_version 
wheezy/sid

No comments: