How to find OS version in Ubuntu Linux

www.lautt‮moc.iru‬
How to find OS version in Ubuntu Linux

To find the version of Ubuntu Linux that you are running, you can try one of the following methods:

  1. lsb_release command: This command is part of the Linux Standard Base (LSB) utility, and it can be used to display information about the Linux distribution. To display the name and version of Ubuntu Linux, you can use the -a flag:
$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal
  1. /etc/os-release file: This file is a standard file found in most Linux distributions, and it contains information about the distribution, including its name and version. To display the contents of this file on Ubuntu Linux, you can use the cat command:
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
  1. /etc/lsb-release file: This file is another standard file found in most Linux distributions, and it contains information about the distribution, including its name and version. To display the contents of this file on Ubuntu Linux, you can use the cat command:
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS"

Note that these methods may not work on all versions of Ubuntu Linux, as the information about the distribution may be stored in different locations or in different formats. However, these methods should work on most versions of Ubuntu.

Created Time:2017-10-28 21:39:03  Author:lautturi