Menu & Search
How to Check Linux Version in Ubuntu

How to Check Linux Version in Ubuntu

This is a guide on how to check your Linux version in Ubuntu.

This is useful for when you are accessing a host for the first time, and/or you wish to check the running Linux distribution & version.

There are a few ways of checking your Ubuntu version. This post covers the following methods –

# lsb_release -a
# cat /etc/os-release

Note: ‘hostnamectl’ does not work on WSL which is why it’s not included in this guide.


Run ‘lsb_release -a’ Command

Run the following command in your terminal to output your Linux version info –

# check linux version on ubuntu
lsb_release -a
Ubuntu lsb_release

Check /etc/os-release File

We can show the Linux version info by displaying the contents of the /etc/os-release file on your system, done by running the ‘cat‘ command –

# check linux version on ubuntu
cat /etc/os-release
Ubuntu /etc/os-release

That’s all for this one. Have a look at the WSL Tag for more info on this area.

Share

0 Comments