ubuntu cli get version code example
Example 1: get ubuntu version
lsb_release -a
Example 2: application version on ubuntu
#in your terminal
apt show <program_name>
You can also use the old style apt-cache in either of the below two fashion:
apt-cache policy <program_name>
apt-cache show <program_name>