How To

Check Ubuntu Version Using Simple Linux Commands

Knowing how to Check Ubuntu Version details is essential for system administration, troubleshooting, and software compatibility. Whether you manage cloud servers, virtual machines, or personal Linux desktops, identifying the correct Ubuntu release helps you install supported packages and apply the right security updates.

Ubuntu introduces new releases regularly, including Long Term Support (LTS) versions that receive updates for several years. Because of that, checking the installed version becomes an important maintenance task for both beginners and experienced Linux users.

Check Ubuntu Version with lsb_release

One of the most popular ways to identify your Ubuntu release is by using the lsb_release command. It provides clean and readable distribution details directly from the terminal.

Run the following command:

lsb_release -a

The output displays information such as:

  • Ubuntu release number
  • Distribution name
  • Codename
  • Version description

If you only want the Ubuntu description, use:

lsb_release -d

This method works well on most Ubuntu desktop installations. However, some lightweight server deployments may not include the package by default.

Check Ubuntu Version Using os-release

The /etc/os-release file offers another reliable way to retrieve operating system information. Unlike some utilities, this method works on nearly every supported Ubuntu release without requiring extra packages.

Use this command:

cat /etc/os-release

The file contains detailed system metadata, including the Ubuntu version, codename, and support URLs.

To display only the version line, run:

grep PRETTY_NAME /etc/os-release

Many administrators prefer this approach because it works consistently across servers, containers, and desktop environments.

Use hostnamectl for System Details

The hostnamectl command provides both hostname information and operating system details in one place.

Execute:

hostnamectl

Besides the Ubuntu version, the command also shows:

  • Kernel version
  • Architecture
  • Virtualization type
  • Machine ID

As a result, hostnamectl becomes useful when auditing Linux servers or troubleshooting infrastructure environments.

Check Kernel Information with uname

Although uname does not directly reveal the Ubuntu release, it helps identify the Linux kernel version currently running on the system.

Run:

uname -r

For additional system details, use:

uname -a

This command is especially useful when verifying kernel updates or debugging hardware compatibility issues.

Check Ubuntu Version from Desktop Settings

Desktop users can also find Ubuntu version information through the graphical interface.

Open:

Settings → About

Ubuntu displays the operating system version, GNOME desktop details, memory usage, and processor information in this section.

Therefore, users who prefer graphical tools can avoid terminal commands entirely.

Why Ubuntu Version Matters

Running outdated Ubuntu releases may expose systems to unpatched vulnerabilities and unsupported software. Additionally, some applications only support newer LTS versions.

Before installing tools like Docker, Kubernetes, or virtualization software, always confirm the installed Ubuntu version first. This simple step prevents compatibility issues and deployment failures later.

Conclusion

Learning how to Check Ubuntu Version information is a basic yet critical Linux administration skill. Commands like lsb_release, hostnamectl, and cat /etc/os-release make the process quick and reliable across servers and desktops.

Whether you manage enterprise infrastructure or a personal Ubuntu system, regularly verifying your Ubuntu release helps maintain security, compatibility, and system stability.

Cyber Defence

Recent Posts

xargs Command in Linux: Build and Execute Commands from Input

The xargs command in Linux reads items from standard input and passes them as arguments to another…

1 day ago

locate Command in Linux: Find Files Fast with a Database Search

The locate command in Linux searches for files and directories by name. It queries a pre-built database…

1 day ago

Listing Linux Services with systemctl: A Complete Guide

Most modern Linux distributions use systemd as the default service manager. Knowing how to list…

1 day ago

How to Truncate Files in Linux: Empty Files Without Deleting

Truncating a file in Linux means removing its contents while leaving the file itself in…

1 day ago

ss Command in Linux: Display Socket Statistics and Connections

The ss command in Linux lists open sockets and active network connections. It replaced the deprecated netstat command and…

2 days ago

ftp Command in Linux: Connect to Servers and Transfer Files

The ftp command in Linux connects to a remote FTP server and transfers files. FTP transmits everything…

2 days ago