Check Ubuntu Version – Quick & Simple

In this tutorial, you’ll learn how to Check Ubuntu Version by using the command line or the Ubuntu Desktop GUI. There are several ways of checking your Ubuntu version and we cover all of them in this article.

Table of Contents

Method 1 – The os-release File

We can read the os-release file located in /etc/ using the cat command to find out which Ubuntu version we are running:

cat /etc/os-releaseCode language: Bash (bash)

Output:

Check Ubuntu Version Method 1

Method 2 – The lsb_release File

We can also read the lsb-release file located in the /etc/ folder to check Ubuntu versions:

cat /etc/lsb-releaseCode language: Bash (bash)

Output:

Check Ubuntu Version Method 2

Method 3 – The issue File

Another file we can check to figure out which Ubuntu version we are running is the issue file located in the /etc/ folder:

cat /etc/issue

Output:

Check Ubuntu Version Method 3

Method 4 – The lsb_release Command

Another way is by using the built-in lsb_release command:

lsb_release -a

Note: This might not work on WSL 2.

Output:

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.4 LTS
Release:	20.04
Codename:	focalCode language: plaintext (plaintext)

Less Information

You can also use the -d flag to shorten the output:

lsb_release -dCode language: Bash (bash)

Output:

Description:  Ubuntu 20.04.4 LTSCode language: plaintext (plaintext)

Method 5 – The hostnamectl Command

We can also use the hostnamectl command to check our Ubuntu version:

hostnamectlCode language: Bash (bash)

Note: This might not work on WSL 2.

Output:

Static hostname: ceos3c-ubuntu
Icon name: Virtual Machine
Chassis: 
Machine ID:
Boot ID:
Operating System Ubuntu 20.04.4 LTS
Kernel:
Architecture: x86-64Code language: CSS (css)

Method 5 – Check Ubuntu Version with GUI

If you are uncomfortable using the command line, you can also check your Ubuntu version inside of the Ubuntu GUI:

  1. Click on the Show Applications button in the lower-left corner.
  2. Click on Settings (type settings in the search bar if you can’t find it).
  3. Select About from the left navigation menu and scroll down until you find the OS Name field.

Summary

This is how easy it is to check Ubuntu versions. To summarize:

  1. You can read the os_release file.
  2. You can read the lsb_release file.
  3. You can read the issue file.
  4. You can use the lsb_release command with either the -a or the -d flag.
  5. You can use the hostnamectl command.

🐧 There are some related articles!
👉 Top Things to do after installing Kali Linux
👉 Linux on Windows – The Complete WSL 2 Tutorial Series
👉 Create Generalized Windows Images with FOG Server
👉 Install FOG Server on Ubuntu
👉 Install Kali Linux on Windows – Complete Guide
👉 The Complete Kali Linux and Windows Dual Booting Guide
👉 Cronjob – The Complete Guide to Cronjobs
👉 Open Bitlocker Drive on Linux – Quick & Easy

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share via
Copy link
Powered by Social Snap