How to see Linux distribution and version

From Cosmin's Wiki

Jump to: navigation, search

Home > Linux how to's > How to see Linux distribution and version

I have seen it quite often that people were asking how to get/obtain/see/print the currently installed Linux distribution on their machines.

I must say upfront that I have tested what is written below on Debian and CentOS.

While most of the answers out there will state for this question that the answer is:

> uname -a

I find this one indeed useless. It gives no indication whatsoever about the Linux distribution (only about the kernel version).

Thus, I would recommend one of the following (although personally I prefer the first one):

Method 1

> cat /etc/issue

Method 2

the following does not work on CentOS:

> lsb_release -a

Method 3

> cat /etc/*release

> cat /etc/*version
as different distros will create files of the following form: