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 –
Note: ‘hostnamectl’ does not work on WSL which is why it’s not included in this guide.
Run the following command in your terminal to output your Linux version info –
# check linux version on ubuntu lsb_release -a
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
That’s all for this one. Have a look at the WSL Tag for more info on this area.