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