How to Check Your Ubuntu Version
Learn how to check your ubuntu version with lsb_release, /etc/os-release, hostnamectl, /etc/issue, uname, and desktop GUI settings in Ubuntu 24.04.

6 min read
Learn how to check your ubuntu version with lsb_release, /etc/os-release, hostnamectl, /etc/issue, uname, and desktop GUI settings in Ubuntu 24.04.
- Prerequisites and Supported Releases
- Step 1: Understanding Ubuntu Releases, Point Releases, and Codenames
- Step 2: Method 1: Using lsb_release -a (Recommended)
Knowing your exact Ubuntu operating system version, release codename, and kernel build is a fundamental prerequisite for system administration, software installation, and technical troubleshooting.
Software repositories, third-party PPAs, binary downloads, and configuration guides all rely on release codenames (such as noble for Ubuntu 24.04 LTS or jammy for Ubuntu 22.04 LTS) to deliver compatible packages.
Furthermore, verifying whether your system is running an officially supported Long-Term Support (LTS) release or an interim release determines your security update lifecycle and maintenance roadmap.
In this guide, we walk through how to check your ubuntu version using multiple command-line utilities, universal Linux files, and graphical desktop interfaces.
Comprehensive step-by-step administrator and desktop guide on how to check your Ubuntu version, release codename, architecture, and Linux kernel version. Covers the canonical lsb_release -a command, universal system inspection via /etc/os-release, systemd hostnamectl system diagnostics, legacy /etc/issue and /etc/debian_version files, querying the Linux kernel with uname -r, and navigating GNOME desktop settings.
Prerequisites and Supported Releases
This guide is thoroughly verified on Ubuntu 24.04 LTS (Noble Numbat) & Ubuntu 22.04 LTS. The instructions apply cleanly to cloud instances (AWS EC2, Google Compute Engine, DigitalOcean, Hetzner), bare-metal servers, and local virtual machines.
Before proceeding, ensure you have the following requirements satisfied:
- A computer or server running any version of Ubuntu Linux.
- Access to a command-line terminal shell or GNOME desktop environment.
- No root or administrative privileges are required (all inspection commands run as standard user).
Step 1: Understanding Ubuntu Releases, Point Releases, and Codenames
Ubuntu release numbers follow a YY.MM convention representing the year and month of public release (e.g., Ubuntu 24.04 was released in April 2024).
Long-Term Support (LTS) releases are published every two years in April and receive five years of standard security maintenance, while interim releases receive nine months of support.
Every Ubuntu release is assigned an alliterative adjective-and-animal codename, such as Noble Numbat (24.04) or Jammy Jellyfish (22.04).
LTS versions also feature point releases (e.g., 24.04.1, 24.04.2) that incorporate roll-up security patches and updated hardware enablement (HWE) Linux kernels.
Step 2: Method 1: Using lsb_release -a (Recommended)
The lsb_release utility is the official, distribution-standard command for displaying Linux Standard Base (LSB) information.
Running lsb_release -a provides a clean summary containing the distributor ID, description, release version, and codename:
Execute the command in your terminal:
# Check complete Ubuntu release information:
lsb_release -a
# Expected output on Ubuntu 24.04 LTS:
# No LSB modules are available.
# Distributor ID: Ubuntu
# Description: Ubuntu 24.04 LTS
# Release: 24.04
# Codename: noble
# Quick single-line description only:
lsb_release -d
# Output: Description: Ubuntu 24.04 LTS
Step 3: Method 2: Inspecting /etc/os-release (Universal Standard)
The /etc/os-release file is the universal systemd standard present across all modern Linux distributions (including Ubuntu, Debian, Fedora, RHEL, and Arch).
Because it is a plain text file, it works reliably even in minimal cloud server images or Docker containers where lsb_release might not be installed.
Display the file contents using cat:
# View universal OS release metadata:
cat /etc/os-release
# Expected output confirms:
# PRETTY_NAME="Ubuntu 24.04 LTS"
# NAME="Ubuntu"
# VERSION_ID="24.04"
# VERSION="24.04 LTS (Noble Numbat)"
# VERSION_CODENAME=noble
# ID=ubuntu
# ID_LIKE=debian
# HOME_URL="https://www.ubuntu.com/"
# SUPPORT_URL="https://help.ubuntu.com/"
# BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
# Extract just the version or codename in scripts:
. /etc/os-release && echo "$PRETTY_NAME (codename: $VERSION_CODENAME)"
Step 4: Method 3: Using hostnamectl
On systemd-managed systems, the hostnamectl command displays system identification, network hostname, operating system, and hardware architecture.
Run hostnamectl without arguments:
The output summarizes operating system edition, kernel release, and hardware architecture in a single view:
# Query system and operating system status:
hostnamectl
# Expected output snippet:
# Static hostname: ubuntu-server
# Icon name: computer-vm
# Chassis: vm
# Operating System: Ubuntu 24.04 LTS
# Kernel: Linux 6.8.0-31-generic
# Architecture: x86-64
Step 5: Method 4: Reading /etc/issue and /etc/debian_version
The /etc/issue file contains the system identification text displayed to users on the pre-login terminal console prompt.
You can read this file for a quick one-line version check:
Additionally, because Ubuntu is built upon Debian, you can inspect /etc/debian_version to see which Debian baseline release your Ubuntu build derives from:
# View pre-login system banner text:
cat /etc/issue
# Output confirms: Ubuntu 24.04 LTS \n \l
# Check underlying Debian base version:
cat /etc/debian_version
# Output confirms: trixie/sid (for 24.04) or bookworm/sid (for 22.04)
Step 6: Method 5: Checking the Linux Kernel Version (uname -r)
In addition to the distribution version, knowing your active Linux kernel version is critical for hardware compatibility, driver compilation, and container virtualization.
Use the uname utility to inspect the running kernel release, build date, and system CPU architecture:
Run the command in your shell:
# Display the active Linux kernel release version:
uname -r
# Output confirms: 6.8.0-31-generic
# Display full system, kernel, and hardware architecture details:
uname -a
# Output confirms:
# Linux ubuntu-server 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC ... x86_64 GNU/Linux
Step 7: Method 6: Viewing Ubuntu Version from GNOME Desktop (GUI)
If you are using Ubuntu Desktop, you can verify your system version graphically without opening a terminal shell.
Click on the top-right system status menu and open Settings.
Scroll down the left navigation sidebar and click on System (or About in older releases).
The About screen displays your OS Name (e.g., Ubuntu 24.04 LTS), OS Type (64-bit), GNOME Version, Windowing System (Wayland or X11), and processor and memory hardware specifications.
Troubleshooting and Common Errors
When configuring Ubuntu servers, unexpected permission errors, network timeouts, or lock contention can occur. Review these common issues and verified resolutions:
lsb_release: command not found
Cause: The lsb-release package is not installed on minimal or stripped-down cloud images.
Resolution: Inspect /etc/os-release directly (cat /etc/os-release) or install the utility (sudo apt install -y lsb-release).
cat /etc/os-release
Kernel version shown in uname -r does not match newly installed kernel
Cause: A newer kernel was installed during updates, but the system has not yet rebooted into it.
Resolution: Reboot the system to boot into the newly installed kernel: sudo reboot.
sudo reboot
Operating system description says Ubuntu 24.04 instead of 24.04.1
Cause: The point release update packages have not been applied via APT.
Resolution: Run sudo apt update && sudo apt upgrade -y to upgrade to the latest point release packages.
sudo apt update && sudo apt upgrade -y
Security Best Practices and Hardening
Always verify whether your Ubuntu release is currently supported by Canonical; running end-of-life (EOL) releases leaves your server vulnerable to unpatched security exploits.
Check your Ubuntu version before adding third-party PPAs or repositories to ensure you provide the correct distribution codename in your APT source files.
Keep track of Point Release updates (e.g., from 24.04 to 24.04.1) to receive critical hardware enablement security backports.
Related Ubuntu Tutorials and Documentation
Deepen your Linux system administration skills with our related production-tested guides:
- Initial Server Setup on Ubuntu 24.04 LTS — Hardening and configuration baseline for newly installed Ubuntu machines.
apt update vs apt upgrade vs apt full-upgrade— Manage package upgrades, security patches, and point release enhancements.- Ubuntu Desktop vs Ubuntu Server: Which One Should You Use? — Compare Ubuntu server and desktop editions and features.
Authoritative References and Official Documentation

The Linux Command Line, 2nd Edition: A Complete Introduction
Frequently Asked Questions
Quick answers to common questions and configurations
uname -m in your terminal. If the output returns x86_64 or aarch64, your system is running a 64-bit operating system. If it returns i686 or i386, it is 32-bit.echo $XDG_CURRENT_DESKTOP in your terminal. On standard Ubuntu Desktop, this returns ubuntu:GNOME.Editorial Disclosure: Website Vidya is supported by our readers. When you purchase hosting, tools, or software through our verified partner links, we may earn an affiliate commission at no extra cost to you. We only recommend solutions we trust and rigorously verify.
Rajesh Ray
I’m Rajesh Rai, a full-stack developer, Linux administrator, and technology enthusiast passionate about making complex technology easier to understand and use.
Most Read Guides
TrendingUbuntu Server Not Booting? 10 Simple Steps to Fix It Fast
How to Create a 3D Button in HTML and CSS: Easy Steps
How to Install Python and Pip on Ubuntu 24.04 LTS
How to Install Nginx on Ubuntu 24.04
How to Install Python on Ubuntu 24.04 LTS
Related Technical Guides
Tested runbooks, server administration walkthroughs, and troubleshooting guides


Join the Conversation & Perspective
Have thoughts, counterpoints, or reflections on this story? Engage directly with fellow readers and editorial contributors.
No comments on this guide yet. Be the first to share your thoughts or ask a question!