Linux Command: Show Linux Version

Linux Command: Show Linux Version

There are several ways to show the version of Linux that is installed on a system. Here are a few common methods:

  1. lsb_release command: The lsb_release command is part of the Linux Standard Base (LSB) package, and it can be used to show the version of Linux that is installed on the system. To use the lsb_release command, run the following command:
refer to:‮ual‬tturi.com
lsb_release -a

This will display the distribution name, release number, and codename of the Linux distribution.

  1. uname command: The uname command is used to display information about the Linux kernel and the system it is running on. To show the version of Linux that is installed on the system, you can use the -r option of the uname command, which displays the version of the Linux kernel. For example:
uname -r

This will display the version of the Linux kernel that is running on the system.

  1. /etc/os-release file: The /etc/os-release file is a configuration file that contains information about the Linux distribution, including the distribution name and version. To show the version of Linux that is installed on the system, you can use the grep command to extract the VERSION_ID field from the /etc/os-release file. For example:
grep VERSION_ID /etc/os-release

This will display the version of the Linux distribution that is installed on the system.

Note that these methods may not work on all Linux distributions. The availability and output of these commands and files may vary depending on the distribution and version of Linux that is installed on the system.

Created Time:2017-10-16 14:38:52  Author:lautturi