1. Home
  2. Knowledge Base
  3. Linux System Administration
  4. How to Check Ubuntu Version via Command Line

How to Check Ubuntu Version via Command Line

Introduction

The operating system Ubuntu is a free and open source Linux distribution. It is built on the Debian architecture.

Pre-Launch Checklist

  • This article is intended for Ubuntu Linux only.
  • These instructions are for checking the installed Ubuntu version via the Command Line

How to Check Ubuntu Version via Command Line

lsb_release -a
The results of your command should look something like this:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.04
Release: 19.04
Codename: disco

You’ll see that the Release is listed as 19.04. That is the Ubuntu version: 19.04.

Alternative Methods for Checking Ubuntu Version via Command Line

With /etc/issue

cat /etc/issue
This will return something similar to:
Ubuntu 19.04 \n \l
Where Ubuntu 19.04 is the version.

With /etc/os-release

cat /etc/os-release | grep VERSION
This will return something similar to:
VERSION=”19.04 (Disco Dingo)”
VERSION_ID=”19.04″
VERSION_CODENAME=disco

Where 19.04 (Disco Dingo) is the version.

With hostnamectl

hostnamectl
This will return something similar to:
Static hostname: server-hostname
Icon name: computer-vm
Chassis: vm
Machine ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Boot ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Virtualization: kvm
Operating System: Ubuntu 19.04
Kernel: Linux 5.0.0-15-generic
Architecture: x86-64

Where Operating System: Ubuntu 19.04 is the version.

Was this article helpful?

Get started now!

Test drive GridPane today and see for yourself the awesome suite of features and tools we’ve built for serious WordPress professionals like you. If you’re not happy within the first 15 minutes, hit us up via support and we’ll make it right.

We’re flipping managed WordPress on it’s head… care to join us?

Get Started