The first command you can try is lsb_release. Use the -a flag to see all the outputs.
You can see in the above code and screen shot that the version of Ubuntu is displayed. You can get this into a variable in bash with a simple grep and awk command as shown below:
In the above code we use grep to the find Description, awk to get the second field after the colon, and xargs to stream the leading whitespace.
Also note you can use the command $ cat /etc/os-release
uname is a popular command, but it may not give what you are searching for in this use case.
Use lsb_release command to quickly find the Ubuntu version from the terminal in Ubuntu, lsb_release is the best command to find distribution specific information from the terminal.
Here’s the guide to deploy Elastic Stack on Ubuntu VPS, with secure access, HTTPS proxying,…
This guide walks through deploying Nagios Core on an Ubuntu VPS, from system prep to…
After a decade under Pablo Cantero's stewardship, Shoryuken has a new maintainer - me. I'm…
MAAS 3.7 has been officially released and it includes a bunch of cool new features.…
Update: This article originally concluded that Eisel-Lemire wasn't worth it for Ruby. I was wrong.…
Recently, the team at MinIO moved the open source project into maintenance mode and will…