Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

What terminal command tells the version of Ubuntu.

share|improve this question

marked as duplicate by fossfreedom Jul 2 at 21:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
@fossfreedom this question is not a duplicate of the question you linked because i am asking how to check using terminal, not the graphical way. remove your concern –  Nick Bailuc Jul 2 at 4:39
    
The duplicate covers both terminal and graphical. IMHO they are the same question. These probably should be merged. I'll ask some 20K users before making that decision. –  fossfreedom Jul 2 at 6:02
1  
the duplicate does but the question doesnt. when others search for a terminal command and they find the other question, they wount look into it because it doesnt say anything about it in the question description –  Nick Bailuc Jul 2 at 21:03

2 Answers 2

up vote 51 down vote accepted

This should give you what you want:

cat /etc/lsb-release
share|improve this answer

... or run

lsb_release -d

which should give you the the description including the OS name ("Ubuntu" on an Ubuntu system) and the release number.

lsb_release -c

will give you just the codename (e.g., "precise" for Ubuntu 12.04 LTS).

For the release number only, use

lsb_release -r

For all lsb version details, use

lsb_release -a

EDIT: Thanks Eliah Kagan.

share|improve this answer
4  
That gives the codename. for the description including the OS name ("Ubuntu" on an Ubuntu system) and the release number, use lsb_release -d. For the release number only, use lsb_release -r. For all available lsb information, use lsb_release -a. –  Eliah Kagan Jun 14 '12 at 19:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.