This post is a note to myself since I have come across the need of verifying the version of the Linux distribution installed on my system several times till date.
The standard technique I have been using till date to check the version of the Linux OS installed on my system was to execute:
If you are using a customized version of the Linux based OS, the file,
/etc/issue will probably display a custom message based on the OS distribution.
If you know that the Linux OS installed in your system is a variant of RHEL or Fedora, say CentOS, the command,
cat /etc/redhat-release will provide the human readable release name of the installed OS followed by the version and the code name of the release.
If you are using other variants of the Linux OS, there is a high probability that the execution of the command,
cat /etc/*-release may provide you with the necessary details.
If you are using a recent version of Linux distribution, the command:
lsb_release -i -r will display the Distribution name (
-i) and the Release number (
On a side-note, if you are just looking for the version of the kernel and gcc that were used to build the release:
cat /proc/version will provide the details.