How to check version/release information (Linux)

The following command allows non-root users to check the Linux version/release information.

$ cat etc`ls etc -F grep release$version$`

The following reasons explain why the above command gives the version and release information:

1. The release info is stored right under the etc directory.

The list below shows where the release info of each distribution is stored. You can see it stored right under the etc directory regardless of distribution type.

Location of the release info for each distribution

・Debian type (Ubuntu)

/etc/debian_version

・RedHat type (CentOS)

/etc/redhat-release

・Fedora Core

/etc/redhat-release

・Vine Linux

/etc/vine-release

・Turbo Linux

/etc/turbolinux-release

2. Backquote syntax in bash

Backquote syntax in bash passes a certain command result as a parameter.
The above command means “show files with ‘release’ or ‘version’ at the end of their names which are stored under the directory ‘etc’”.

This post is also available in other languages.