Take the 2-minute tour ×

I'm looking for a Unix/Linux command to determine what version of what distro I'm running.

Specifically, I want to be able distinguish between Ubuntu 9.04 and 9.10.

I was thinking something along the lines of uname -a, but that didn't work.

Ubuntu 9.04 gives:


Ubuntu 9.10 gives:


Any suggestions?

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

You can use this,

cat /etc/issue

or this,

cat /etc/lsb-release

The latter is probably better since it also gives the release name such as "karmic", etc. But it depends what you're using it for I guess.

share|improve this answer
+1 /etc/issue works both on Debian and Ubuntu. –  Johan Jan 11 '10 at 21:06
add comment

lsb_release also displays the version:

$ lsb_release -a 

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu feisty( development branch)

Release: 7.04

Codename: feisty

share|improve this answer
add comment

Your Answer


