Categories: Ubuntu

How to check the Ubuntu version from the command line

Based on Debian, Ubuntu is an open-source and free software-based Linux system. All ubuntu versions may run alone or on a virtual machine on the PC. Ubuntu is a popular cloud-based operating system with OpenStack support. The default desktop of Ubuntu is GNOME.

GNOME is a desktop environment – in plain terms, it is an operating system’s graphical interface (many OSes use GNOME as their graphical interface). GNOME has many components, including support libraries, window/display managers and one composer, and various GNOME applications.

GNOME is free and open-source software. It is mostly aimed towards Linux computers but may be run on BSD. We will be discussing multiple ways to check your Ubuntu version, both by CLI (Command Line Interface) and GUI (Graphical User Interface). Let’s begin!

What is Command-Line?

Earlier, when GUI was not introduced, commands were typed into the command-line interface to communicate with the system’s OS.

In the command-line interface, the user interacts with the operating system in text commands. The commands are then executed by the kernel of the operating system for further processing. Using a command-line interface is preferred over GUI as it adds more efficiency and speed to the execution of the instructions. Besides, while working with virtual machines, one needs to interact with the machine using CLI instead of GUI.

Checking Version of Ubuntu Using the Standard cat Command

cat command in Linux is used to display the content of one or more files present in your machine. It can also be used to create new files and add content to them at creation. To view a file content using the cat command, use the below syntax:

cat file_name

Type following command on the terminal:

$ cat /etc/os-release

Checking Version Using lsb_release Utility

The lsb_release utility displays the LSB (Linux Standard Base) information about the Linux distribution.

A lsb_release tool that provides LSB (Linux Standard Basis) information for the Linux distribution is the best technique for checking your Ubuntu release.

Checking Version Using hostnamectl Command

Another way to check the Ubuntu version is by the following command:

hostnamectl

You may search and modify the hostname and associated parameters with the hostnamectl command. One can also display the distribution name and kernel version of their Linux.

Checking the Ubuntu Version Using GUI

Go to the settings and click on the About button. The following tab will get displayed. You may check the GNOME version as highlighted in the sample image.

Conclusion

We have seen multiple ways to check the version of your Ubuntu OS. It is good to verify the version of Ubuntu to fix and implement for security and performance reasons. Many packages are not compatible with your current OS. Checking the status of the OS version will thus assist you in upgrading your OS and install the required packages to another version. Using Command Line Interface to check the version of your OS is quite helpful when working with virtual machines where you have most of the access to the command line interface and not the GUI.

Ubuntu Server Admin

Recent Posts

Predict, compare, and reduce costs with our S3 cost calculator

Previously I have written about how useful public cloud storage can be when starting a…

19 hours ago

One Thread to Poll Them All: How a Single Pipe Made WaterDrop 50% Faster

This is Part 2 of the "Karafka to Async Journey" series. Part 1 covered WaterDrop's…

22 hours ago

A year of documentation-driven development

For many software teams, documentation is written after features are built and design decisions have…

2 days ago

Announcing FIPS 140-3 for Ubuntu Core22

With the release of the FIPS 140-3 certified cryptographic modules for Ubuntu 22.04 LTS, Canonical…

3 days ago

The foundations of software: open source libraries and their maintainers

Open source libraries are repositories of code that developers can use and, depending on the…

6 days ago

From inspiration to impact: design students from Regent’s University London explore open design for their dissertation projects

Last year, we had the opportunity to speak at Regent’s UX Conference (Regent’s University London’s…

7 days ago