Question #651   Submitted by Answiki on 10/25/2021 at 08:34:58 PM UTC

How to print the Ubuntu version in a terminal?

Answer   Submitted by Answiki on 07/22/2022 at 05:41:43 PM UTC

The following command displays the current Ubuntu version:

lsb_release -a

As an example:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.3 LTS
Release:	20.04
Codename:	focal

It is also possible to display the operating system identification data located in the file /etc/os-release.

cat /etc/os-release 

Here is an example:

NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 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



9 events in history
Answer by Answiki on 07/22/2022 at 05:41:43 PM

The following command displays the current Ubuntu version:

lsb_release -a

As an example:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.3 LTS
Release:	20.04
Codename:	focal

It is also possible to display the operating system identification data located in the file /etc/os-release.

cat /etc/os-release 

Here is an example:

NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 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



Question by Answiki 10/25/2021 at 08:34:58 PM
How to print the Ubuntu version in a terminal?
Question by Answiki 10/25/2021 at 08:34:48 PM
How to get the Ubuntu version from terminal?
Question by Answiki 10/25/2021 at 08:34:42 PM
How to display the Ubuntu version from terminal?
Question by Answiki 10/25/2021 at 08:34:35 PM
How to check the Ubuntu version from terminal?
Answer by Answiki on 10/25/2021 at 08:33:41 PM

The following command displays the current Ubuntu version:

lsb_release -a

As an example:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.3 LTS
Release:	20.04
Codename:	focal

Answer by Answiki on 10/12/2021 at 06:26:26 PM

The following command displays the current Ubuntu version:

lsb_release -a

Question by Answiki 10/12/2021 at 06:26:03 PM
How to check my Ubuntu version in command line?
Question by Answiki 10/12/2021 at 06:25:54 PM
How to check my Ubuntu version from terminal?
# ID Query URL Count

Icons proudly provided by Friconix.