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
Sponsored
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.

Sponsored

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

Top 11 Linux Log Monitoring Tools for System Administrators

In Linux environments, system administrators need to continuously monitor log files to evaluate system health,…

3 hours ago

Accelerating AI with open source machine learning infrastructure

The landscape of artificial intelligence is rapidly evolving, demanding robust and scalable infrastructure. To meet…

10 hours ago

Hardening automation for CIS benchmarks now available for Ubuntu 24.04 LTS

We’re pleased to release Ubuntu Security Guide profiles for CIS benchmarks. These profiles will allow…

10 hours ago

Detecting and Fixing Memory Leaks with Valgrind

Memory leaks are among the most frustrating bugs to track down in C and C++…

1 day ago

How to Kill Processes Using Specific Ports on Linux, Windows and MacOS

Have you ever encountered issues starting a server or application because the required port is…

1 day ago

How to Fix the “Native Host Connector Not Detected” Error for GNOME Extensions in Ubuntu 22.04

When upgrading to Ubuntu 22.04 LTS (Jammy Jellyfish), many users encounter the error message: “Although…

1 day ago