How to check os version in Linux command line

There are several ways to check the operating system version in the Linux command line. Here are a few common methods:

  1. Using the lsb_release command:
lsb_release -a

This command displays detailed information about the Linux distribution, including the version, release number, and codename.

  1. Using the /etc/os-release file:
cat /etc/os-release

This file contains information about the operating system, including the version and name.

  1. Using the uname command:
uname -r

This command displays the kernel version, which can give you an indication of the operating system version.

  1. Using the cat /proc/version command:
cat /proc/version

This command displays detailed information about the kernel, including the operating system version.

These are a few common methods for checking the operating system version in the Linux command line. Depending on your specific distribution, one of these methods may provide more detailed information than the others.

Leave a Comment