How to Tell What Version of Ubuntu You Are Running
Telling what version of Ubuntu you are running is extremely easy. You would commonly use this command to figure out if you are running Edgy after you upgraded from Dapper.
cat /etc/issue
Ubuntu edgy (development branch)
Note that the version numbers might change over time. I'm running the beta version so that's what shows up when I run that command. Either way, it should be clear that you are running Edgy.
The Geek is the founder of How-To Geek and a geek enthusiast. When he's not coming up with great how-to articles, he's probably writing at his personal blog. This article was written on 10/19/06 and tagged with: Ubuntu, Ubuntu Tips & Tweaks


I think that the file /etc/lsb-release should be more reliable
I agree w/ John — you don't really know what "issue" is used for, do you?
I suggest you RTFM by: "man issue motd"
The more paranoid you get, the less hints you give to non-authenticated users, y'know?
You are correct, lsb-release is a better option for ubuntu, but in my experience /etc/issue works across most linux varieties.
uname ?
uname really just prints information about the kernel version… and while much more useful, is not the same as the version of the OS.
For instance, uname -a on my dev server:
Linux superfast 2.6.17-10-server #2 SMP Tue Dec 5 22:29:32 UTC 2006 i686 GNU/Linux
No mention of Ubuntu in there.
$ uname
Linux
$_
I use: lsb_release in this way:
$ lsb_release -d -s -c
uname tell you the kernel vercion only not the distribution information