• Start Here
    • How to Install Linux
    • Which Distro To Choose
    • 10 Best Linux Distributions of 2023
  • Distros
    • Ubuntu
  • Linux Commands
  • Virtualization
  • Open Source
Linux Start
  • Start Here
    • How to Install Linux
    • Which Distro To Choose
    • 10 Best Linux Distributions of 2023
  • Distros
    • Ubuntu
  • Linux Commands
  • Virtualization
  • Open Source
Linux Start
Home»Distros»Ubuntu»How To Check Ubuntu Version

How To Check Ubuntu Version

Anup ThapaBy Anup ThapaFebruary 24, 2023 Ubuntu 2 Mins Read

Ubuntu’s current long-term support release is Ubuntu 22.04 LTS (Jammy JellyFish) while the latest interim release is Ubuntu 22.10 (Kinetic Kudu). The next interim release, Ubuntu 23.04 (Lunar Lobster), is almost here.

Users running the LTS release likely won’t be in a hurry to upgrade, whereas interim users prefer keeping up with the latest version. If you’re curious about whether you should update or not, your first step should be to check your current Ubuntu version.  

Lsb_release

The standard way to check the OS version is by querying the /etc/lsb-release file. We’ll first do this with the lsb_release command.

lsb_release -a

In our case, the release version is 22.04 (codenamed jammy). The .2 at the end means that this is the second updated version of jammy which includes various bug fixes compared to the original release. 

Alternatively, you can also use cat to print the contents of the lsb-release file.

cat /etc/lsb-release

If you want to extract the version info only, you can use

grep DISTRIB_DESCRIPTION /etc/lsb-release | cut -d "=" -f 2-

Aside from this, you can also query the /etc/os-release or /etc/issue files to get the version info.

cat /etc/os-release | awk -F= '/^VERSION=/ {print $2}' /etc/os-release | sed 's/"//g'
cat /etc/issue

Hostnamectl

Hostnamectl is used to query and change the hostname and related settings. When no command is specified, it returns the output of hostnamectl status.  

hostnamectl

Aside from the OS version, it’ll also display other useful information such as the hostname, kernel version, and hardware model. If you don’t need the extra info and only want the version, you can instead use

hostnamectl | grep 'Operating System' | awk '{print $3,$4,$5}'

Settings

You can also check the OS version and related system information from the Settings app.

  1. Search and open the ‘About’ page from the Applications screen.
    ubuntu about system information
  2. Check the OS Name field here.
    ubuntu settings os name version
Anup Thapa
  • LinkedIn

Anup Thapa has been using Linux for over 5 years. He has an extensive background in computer hardware and networking. At LinuxStart, Anup is an integral part of our editorial team. His goal is to effectively communicate technical concepts in a simplified form understandable by new Linux users. To this end, he mainly writes beginner-friendly tutorials and troubleshooting guides. Outside of work, he enjoys experimenting with different Linux distros and reading up on things like networking and virtualization.

Leave A Reply Cancel Reply

Table of Contents
  • Lsb_release
  • Hostnamectl
  • Settings
Linux Start
Guides

What is the Linux Kernel?

The Linux Kernel is the core of the Linux operating system and is central to…

How To Install Linux Mint

How To Install Linux on VirtualBox

Getting Started with Linux

How to Install Linux

10 Best Linux Distros of 2023

Which Linux Distro Should You Choose? A Complete Guide to Help You Decide

© 2023 LinuxStart.com

Type above and press Enter to search. Press Esc to cancel.