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
Run Laravel queue workers with Supervisor
How to Run Laravel Queue Workers in Production with Supervisor
May 23, 2026
Nginx as a reverse proxy for a Node.js app on Ubuntu
How to Set Up Nginx as a Reverse Proxy for Node.js on Ubuntu
May 23, 2026
Install and configure Redis on Ubuntu for Laravel and WordPress
How to Install and Configure Redis on Ubuntu (for Laravel & WordPress)
May 23, 2026
Harden a fresh Ubuntu VPS with UFW, Fail2Ban, and SSH key auth
How to Harden a Fresh Ubuntu VPS: UFW + Fail2Ban + SSH Key Auth
May 23, 2026
Set up Let's Encrypt SSL with Certbot on Ubuntu
How to Set Up Let’s Encrypt SSL with Certbot on Ubuntu (Apache & Nginx)
May 23, 2026

You Might Also Like

MySQL top CPU usage — PROCESSLIST snapshot and performance_schema digest
Server Management

How to Check Which MySQL Database or User Is Using the Most CPU

8 Min Read
Configure WordPress multisite with subdirectories on Nginx — nginx gear + wordpress tree with subsite branches
Web Development

How to Configure WordPress Multisite with Subdirectories on Nginx

12 Min Read
WordPress too many redirects HTTPS — Cloudflare flexible SSL loop and the wp-config fix
Web Development

Fix ERR_TOO_MANY_REDIRECTS in WordPress After Switching to HTTPS

7 Min Read
Nginx 502 with recv() failed 104 connection reset — PHP-FPM timeout and memory tuning
Server Management

Fix Nginx ‘recv() failed (104: Connection reset by peer)’ with FastCGI

9 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?