How to see the version of Oracle Linux

Determine Oracle Linux version

Oracle Linux is based on Red Hat Enterprise Linux. At first, it may be confusing to determine what specific operating system is running. This is because both have the /etc/redhat-release file.

If that file exists, use the cat command to display the contents. Next step is to determine if there is a /etc/oracle-release file as well. If so, then you can be sure that Oracle Linux is running.

cat /etc/oracle-release

Sample output might be: Oracle Linux Server release 6.7

Other options

Next time when you are on a system and not sure what it is running, use this:

ls -l /etc/*-release

This shows you any files that might give a hint on the operating system version.

  • /etc/enterprise-release (older versions of OEL)
  • /etc/issue
  • /etc/issue.net
  • /etc/lsb-release

Relevant commands in this article

Like to learn more about the commands that were used in this article? Have a look, for some there is also a cheat sheet available.

  • cat
  • ls

Related articles

Like to learn more? Here is a list of articles within the same category or having similar tags.

Feedback

Small picture of Michael Boelen

This article has been written by our Linux security expert Michael Boelen. With focus on creating high-quality articles and relevant examples, he wants to improve the field of Linux security. No more web full of copy-pasted blog posts.

Discovered outdated information or have a question? Share your thoughts. Thanks for your contribution!

Mastodon icon