How7o
  • Home
  • Tools
  • Prank Screens
  • Learn
  • Blog
  • Contact
Reading: How to Check Your Ubuntu Version
Share
How7oHow7o
Font ResizerAa
  • OS
Search
  • Home
  • Tools
  • Prank Screens
  • Learn
  • Blog
  • Contact
Follow US
© 2024–2026 How7o. All rights reserved.
How7o > Free Laravel, PHP, WordPress & Server Tutorials > Server Management > How to Check Your Ubuntu Version
Server Management

How to Check Your Ubuntu Version

how7o
By how7o
Last updated: May 22, 2026
4 Min Read
Check Ubuntu version — terminal and Settings
SHARE

To check your Ubuntu version, the cleanest command is lsb_release -a. It prints the release number, codename, and description in four lines. For scriptable output use cat /etc/os-release, and for a one-line answer use lsb_release -d.

Contents
  • TL;DR
  • lsb_release -a — the clean answer
  • /etc/os-release — for scripts
  • Old-school: /etc/issue
  • GUI — Settings → About
  • Frequently asked questions
  • Related guides
  • References

Last verified: 2026-05-17 on Ubuntu 22.04 and 24.04. Originally published 2023-03-01, rewritten and updated 2026-05-17.

TL;DR

# Clean human-readable output
lsb_release -a

# Just one line (description)
lsb_release -d

# Scriptable — VERSION_ID is the cleanest single value
cat /etc/os-release | grep '^VERSION_ID='

# Old-school but works
cat /etc/issue

# Systemd summary (also includes kernel)
hostnamectl

lsb_release -a — the clean answer

lsb_release -a

Sample output:

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy

For a single line, ask for just the description:

lsb_release -d
# Description:    Ubuntu 22.04.4 LTS
Check Ubuntu version — lsb_release, /etc/os-release, /etc/issue, hostnamectl, Settings GUI

/etc/os-release — for scripts

source /etc/os-release
echo "Running Ubuntu $VERSION_ID ($VERSION_CODENAME)"
# Running Ubuntu 22.04 (jammy)

This is the safest choice inside a Bash script — /etc/os-release is guaranteed to exist on every modern Ubuntu (and every other systemd Linux), so no install step.

Old-school: /etc/issue

cat /etc/issue
# Ubuntu 22.04.4 LTS \n \l

Works without any tools installed but the format isn’t structured — \n and \l are getty placeholders, not literal newlines. Prefer /etc/os-release for anything programmatic.

GUI — Settings → About

On Ubuntu Desktop: click the system menu (top-right) → Settings → scroll to About. The OS Name and OS Version lines display the same info as lsb_release -a. For Server installs (no GUI), stick with the CLI commands above.

Frequently asked questions

What’s the difference between Ubuntu’s release number and codename?

The release number is YY.MM — year and month of the release (22.04 = April 2022). The codename is an alphabetical adjective + animal pair (22.04 = Jammy Jellyfish, 24.04 = Noble Numbat). They refer to the same release; some scripts use the codename (apt sources, especially), some use the number.

How can I tell if I’m on an LTS release?

Look at the release year — Ubuntu LTS releases land on even years (20.04, 22.04, 24.04). Non-LTS interim releases land on odd years and at .10 (e.g. 23.04, 23.10). The PRETTY_NAME in /etc/os-release includes the LTS tag explicitly when applicable.

Does this work on Ubuntu Server (no GUI)?

Yes — every command in this guide is text-only. The GUI Settings → About page is just one more way for desktop users; the CLI commands work identically on Server and Desktop variants.

Why does cat /etc/issue sometimes show the wrong version after an upgrade?

It usually doesn’t, but a few releases ago there were edge cases where /etc/issue wasn’t refreshed during do-release-upgrade. The reliable source after an upgrade is always cat /etc/os-release or lsb_release -a — both read the canonical metadata.

Related guides

  • How to Check the Linux OS Name and Version from the Command Line
  • How to Update Ubuntu to the Latest Kernel
  • How to List Network Devices on Linux

References

Ubuntu release notes: wiki.ubuntu.com/Releases. systemd os-release: freedesktop.org/software/systemd/man/latest/os-release.html.

TAGGED:BashconfigurationUbuntu

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
[mc4wp_form]
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Copy Link Print
Previous Article Check Linux OS name and version from the command line How to Check the Linux OS Name and Version from the Command Line
Next Article Comment in a .gitignore file with the # character How to Comment in a .gitignore File
Leave a Comment

Leave a Reply Cancel reply

You must be logged in to post a comment.

FacebookLike
XFollow
PinterestPin
InstagramFollow
Most Popular
Set vi as the default editor in Ubuntu — a terminal opening the vim editor
How to Set vi (Vim) as the Default Editor in Ubuntu
June 8, 2026
rsync says ALL DONE but files are missing — a terminal showing ALL DONE next to an empty folder
rsync Says “ALL DONE” but Files Are Missing: How to Verify
June 8, 2026
Migrate a website to a new server with rsync — files copying from an old server to a new one over SSH
How to Migrate a Website to a New Server With rsync
June 8, 2026
Bun runtime — faster JS toolkit replacing npm in Laravel projects
How to Install Bun Runtime on Ubuntu (And Use It in a Laravel Project)
May 24, 2026
Tailscale mesh — peer-to-peer connections between devices, coordination server
How to Install Tailscale on Ubuntu (Zero-Config Mesh VPN for Self-Hosters)
May 24, 2026

You Might Also Like

Migrating files from cPanel to aaPanel using rsync
Server Management

cPanel to aaPanel Migration with rsync: Fix Permissions, SSH Port, and CSF Firewall

6 Min Read
Completely remove MariaDB from a RHEL-family server
Server Management

How to Remove MariaDB Completely from RHEL/CentOS

5 Min Read
Update Ubuntu to the latest kernel version
Server Management

Update Ubuntu to the Latest Kernel Version (Safe Server Steps)

5 Min Read
PHP add days to a date — strtotime and DateTimeImmutable side by side
Web Development

How to Add Days to a Date in PHP

5 Min Read
How7o

We provide tips, tricks, and advice for improving websites and doing better search.

Tools

  • Age Calculator
  • Word Counter
  • Image Upscaler
  • Password Generator
  • QR Code Generator
  • See all tools→

Pranks

  • Fake Blue Screen Prank
  • Hacker Typer
  • Fake iMessage Generator
  • Windows XP Crash Prank
  • Windows 11 Update Prank
  • See all prank screens →

Company

  • About Us
  • Blog
  • Contact
  • Privacy Policy
  • Terms of Service
  • Sitemap
© 2024–2026 How7o. All rights reserved.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?