How to Check Your Linux Distribution Version

Following an installation guide and it shows different installation steps for different Linux distributions?

Here's the quickest way to find out:

cat /etc/os-release

This command displays information about your Linux operating system by reading the contents of the /etc/os-release file. Most modern Linux distributions, including Ubuntu, Debian, CentOS, Rocky Linux, AlmaLinux, and Fedora, store their operating system details in this file.

Example Output

NAME="Ubuntu"
VERSION="24.04 LTS (Noble Numbat)"
ID=ubuntu
ID_LIKE=debian
VERSION_ID="24.04"
PRETTY_NAME="Ubuntu 24.04 LTS"

What Does This Information Mean?

Some of the most useful fields include:

  • NAME – The name of the Linux distribution.
  • VERSION – The full version information.
  • VERSION_ID – The distribution version number.
  • ID – The distribution identifier used by scripts and applications.
  • PRETTY_NAME – A user-friendly version of the operating system name.

0 Comments