You are here

Find out Linux distro and version

If you need to find out which "flavour" (or distro) Linux you are using just type the following command at the prompt:


[definenull@hm1446 ~]$ cat /etc/*-release
Red Hat Enterprise Linux Server release 5.3 (Tikanga)

This might not work on all distros, so a more general approach would be running the command:


[definenull@hm1446 ~]$ lsb_release -a
LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 5.3 (Tikanga)
Release: 5.3
Codename: Tikanga

If you need to find out which Linux version you are using, just type:


[definenull@hm1446 ~]$ uname -a
Linux hm1446 2.6.18-92.1.13.el5PAE #1 SMP Thu Sep 4 04:05:54 EDT 2008 i686 i686 i386 GNU/Linux

The output for this command is not much clear, so you could try another approach, which is not that better but shows more detailed info:


[definenull@hm1446 ~]$ cat /proc/version
Linux version 2.6.18-92.1.13.el5PAE (xxxxxxxxxxxx@hs20-bc2-4.build.redhat.com) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)) #1 SMP Thu Sep 4 04:05:54 EDT 2008

If you have other suggestions, please leave a comment!
Cheers