How to find Linux distribution and kernel version

In order find out what version of Linux you are running you can execute either of the following commands:

  • cat /etc/*-release
  • lsb_release -a
  • cat /proc/version
  • dmesg | head -1

To find out the kernel version of Linux you can execute either of the following commands:

  • uname -a
  • uname -mrs

Disclaimer: These commands worked for me on Debian Linux.

Update for Oracle Linux

The following commands gave accurate information about OS and release numbers on Oracle Linux.

rpm -qf /etc/redhat-release

oraclelinux-release-6Server-8.0.3.x86_64
cat /etc/issue.net | head -1

Oracle Linux Server release 6.8

 

Leave a Reply

Your email address will not be published. Required fields are marked *