Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
How do I find out what version of Linux I’m running?

I need to find out some information about the server os I'm working on.

The release version (e.g. 9.04 if Ubuntu or 4 if RHEL) is important to me and the command uname doesn't show it.

$ uname -a
Linux xxxxxxx 2.6.9-78.0.22.EL #1 Fri Feb 31 25:71:00 EDT 2009 x86_64 GNU/Linux

So: How to get this information via a commandline command?

share|improve this question

marked as duplicate by jtimberman, Diago Aug 25 '09 at 16:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2  
Duplicate: superuser.com/questions/11008/… –  jtimberman Aug 25 '09 at 14:36
add comment

5 Answers

up vote 7 down vote accepted

Most (if not all) modern distributions will include the lsb_release command.

heillinr@mojojojo:~$ lsb_release -r
Release:    9.04
heillinr@mojojojo:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 9.04
Release:    9.04
Codename:   jaunty

Should give you what you are after :)

share|improve this answer
add comment

What do you have in /etc/*-release? I have /etc/lsb-release which contains:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.10
DISTRIB_CODENAME=intrepid
DISTRIB_DESCRIPTION="Ubuntu 8.10"

http://linux.about.com/cs/linux101/g/lsbrelease.htm

share|improve this answer
add comment

Try

cat /etc/lsb-release

share|improve this answer
add comment

I didn't know about lsb_release.

My method for RPM based systems was:

$ rpm -qa | grep release
redhat-release-5Server-5.3.0.3
redhat-release-notes-5Server-25
share|improve this answer
add comment

in addition to lsb-release (which is available as lsb-release package under debian), you can look at /etc/debian_version(for debian and derivatives) and /etc/issue for most other distributions.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.