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 purchased a web server recently and have got access to shell on it. I dont know the linux version on the server. I am not used to running linux commands, so can anybody help me in determining the linux version using the shell commands.

share|improve this question
add comment

migrated from stackoverflow.com Nov 15 '11 at 15:52

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Sathya Nov 16 '11 at 2:05

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.

6 Answers

It depends on what you mean by "linux version". You can get a lot of information from:

$ uname -a

If you want specifics about the distribution, it will depend on the distro. For example:

$ cat /etc/redhat-release

will give information if you're on a red hat box, but not much if you're on Debian.

You can also try any of:

$ cat /proc/version
$ cat /etc/lsb-release
$ cat /etc/issue
$ cat /etc/debian_version
$ cat /etc/*version
$ cat /etc/slackware-version
$ cat /etc/SuSE-release
$ cat /etc/*release

I'm sure the list is endless, but /etc/*version or /etc/*release should (probably) do it.

share|improve this answer
    
yes i want to know about the distribution too..thanx a lot!! –  chetan Nov 15 '11 at 13:29
add comment

Some distros come with lsb_release. Try

lsb_release -a
share|improve this answer
add comment

You can use:

uname -a

or

cat /proc/version
share|improve this answer
add comment

the uname command should help. to get all information about a system type :

uname -a

to get more info about the command you can type:

man uname

the command man is a linux staple and provides documentation about most if not all commands available.

hope that helps

share|improve this answer
add comment

Try uname:

f0725470@g0:~$ uname --all
Linux g0 2.6.30-perfctr #1 SMP Wed Sep 16 15:56:16 CEST 2009 x86_64 GNU/Linux
share|improve this answer
add comment
/*

Try this command it will show kernal name (-s) , kernel release (-r) and kernel version (-v)

For details do $man uname
*/

$uname -s -r -v
share|improve this answer
add comment