Tuesday, December 6, 2011

Get current ubuntu version

ubuntu1004@ubuntu1004:~$cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.04
DISTRIB_CODENAME=natty
DISTRIB_DESCRIPTION="Ubuntu 11.04"

ubuntu1004@ubuntu1004:~$cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -d\= -f2
natty
ubuntu1004@ubuntu1004:~$grep DISTRIB_CODENAME /etc/lsb-release | cut -d\= -f2
natty

No comments:

Post a Comment