Posted in Command Line, Linux Command to Find Current Ubuntu Version Binny V A August 21, 2009 7 Comments on Command to Find Current Ubuntu Version Run this command to find the installed version of Ubuntu… cat /etc/lsb-release Author: Binny V AA philosopher programmer who specializes in backend development and stoicism.
# GET AND SET UBUNTU VERSION INFORMATION D2_OSDIST=”(lsb_release -is)” D2_OSVER=”(lsb_release -rs)” D2_OSNICK=”$(lsb_release -cs)” Here I have set the distribution, version and nickname to variables – using bash. Reply
You can also find it by using:
cat /etc/issue
Try this out and see what you get!
Hey – that comment works on Non Ubuntu distros(worked in Fedora) – thanks for the feedback.
anytime Binny:)
# GET AND SET UBUNTU VERSION INFORMATION
D2_OSDIST=”(lsb_release -is)”
D2_OSVER=”(lsb_release -rs)”
D2_OSNICK=”$(lsb_release -cs)”
Here I have set the distribution, version and nickname to variables – using bash.
Other method:
$ cat /etc/[A-Za-z]*[_-][rv]e[lr]*
Thanks Binny 🙂
Universal:
% lsb_release -a