While having a great Latin America coffee from Ecuador I came to realize that I did not remember how to check Linux OS version using the command line.

Below are some examples for finding your Linux OS version. Open your command line:

/etc/os-release file

Type the following command using cat in Debian based distros:

cat /etc/os-release

I got the below result in my terminal:

Check Linux OS version Command Debian

/proc/version file

Using cat /proc/version worked for me for both Debian and Red Hat distros. Simply run:

cat /proc/version

And you should get the below result:

Linux version 4.4.0-198-generic (buildd@lgw01-amd64-051) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12) )

Other commands to find Linux OS version

Try running in your terminal the below commands and experiment to see what output you get. If your Linux distro does not support it you should get a “command not found” error.

cat /etc/issue
uname -a
lsb_release -a (mainly for Debian distros)

Leave a comment

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