Howtos / Articles

Find what Linux distribution you are using

There are many Linux distributions out there, all with their slight differences. It’s sometimes its hard to determine what distribution you are current using, assuming you weren’t the one who installed it. The commands below can be used to determine the Linux distribution you are using, and in most cases, what version.

Generic check:

cat /etc/


cat /etc/issue

Sample output:

# cat /etc/
CentOS release 6.3 (Final)
Kernel \r on an \m

This shows that the distribution is CentOS, and its version 6.3.

This will work for most distributions that show the distribution name and version number at the login prompt.

Another generic check:

$ cat /etc/*release*


# cat /etc/*release*
CentOS release 6.3 (Final)
CentOS release 6.3 (Final)
CentOS release 6.3 (Final)

Ubuntu specific:

If you know its a Ubuntu distribution, but aren’t sure what version, you can use the following command:

$ lsb_release -a

Example output:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 10.04.4 LTS
Release:        10.04
Codename:       lucid

CentOS specific:

# cat /etc/centos-release

Example output:

# cat /etc/centos-release
CentOS release 6.3 (Final)

Share this howto article!
  • Facebook
  • Twitter
  • Reddit
  • email

Leave a Reply




You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>