Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to tell which Linux flavor and version on the machine I am on running? This may be a strange question, but if I'm given a machine and connect to the monitor and the keyboard and if the machine is already running in run level 3, how do you tell what is running on the machine.

share|improve this question
up vote 4 down vote accepted

uname -s (OS name) is what you're looking for, uname -a will give you more details, like the OS version & hardware platform.

If uname -s returns Linux you then need to turn to something Linux-specific to find out what distribution you're running (lsb_release -a does this, as Zypher mentioned).

share|improve this answer
Thanks. That works. I really appreciate it. – PJ. Feb 3 '10 at 6:04

You can do cat /etc/issue the problem with doing this is that sysadmins can and will change this file.

or use lsb_release -a (more reliable and portable) This is a better method and is supported on any modern OS Linux Distro.

share|improve this answer
Unfortunately lsb_release is a linuxism: It won't work on {Free,Net,Open}BSD, Solaris, AIX or HP-UX - All of which I would call modern operating systems :) – voretaq7 Feb 3 '10 at 6:00
@voretaq7: you sir are correct ... stupid im distracting me. – Zypher Feb 3 '10 at 6:09
I only notice these things because Linux is the minority in my environment... – voretaq7 Feb 3 '10 at 6:26

You can try running:

uname -a

share|improve this answer

I use this command to find the name of the distro:

cat /etc/*release*

And this command to find the number of cpu cores (and approximate speed):

cat /proc/cpuinfo | grep bogomips

This for the kernel/machine:

uname -a

And this to see what's up in general (requires htop):

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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