Friday, January 30, 2009

Checking Linux version

How to check which Linux version/release is running on your Linux machine:

- on Redhat:
$ more /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 5)

- on Debian:
$ cat /etc/debian_version
4.0
-- OR --
$ cat /etc/issue
Debian GNU/Linux 4.0 \n \l
-- OR --
$ cat /proc/version
Linux version 2.6.24.7-metacarta-appliance-1 (root@ben-bulben) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #2 SMP Thu Jul 24 04:59:24 EDT 2008
(NOTE: in the latter case, it shows Debian 4.1.1 rather than 4.0. Which one is correct?)
-- OR -- (as another source mentioned, but doesn't work in my case)
$ lsb_release -a, OR
$ cat /etc/lsb-release

The following are just copy-pasting for easy reference. I don't have Linux installation from these distros to verify:

- on Fedora:
$ cat /etc/redhat-release

- on Ubuntu:
$ cat /etc/issue
$ lsb_release -a

That's all.. :)

Source:
http://www.debianadmin.com/find-your-debian-or-ubuntu-linux-version-you-are-running.html
http://www.go2linux.org/find-debian-ubuntu-version-you-are-running
http://sysdigg.blogspot.com/2007/12/how-to-check-linux-releaseupdate-in.html

No comments:

Post a Comment