Tecadmin published a quick tutorial about how to check Ubuntu version with command or script.
How to Check Ubuntu Version with Command or Script
The lsb-release is the standard package for reporting the version on Ubuntu systems. Which is basically written in Python programming language. The lsb-release package provides a command lsb_release used to check Ubuntu version and codename on command line. In this tutorial, you will learn various options to lsb_release command on Ubuntu system.
How to Check Ubuntu Version with Command or Script – TecAdmin