2

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.

4 Answers 4

4

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).

0
4

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.

3
  • 1
    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, 2010 at 6:00
  • @voretaq7: you sir are correct ... stupid im distracting me.
    – Zypher
    Feb 3, 2010 at 6:09
  • I only notice these things because Linux is the minority in my environment...
    – voretaq7
    Feb 3, 2010 at 6:26
1

You can try running:

uname -a

0

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):

htop

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .