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.

I'd like to know which Ubuntu distro is installed on my laptop. I know that it is Precise Pangolin, but is it Xubuntu, Lubuntu, plain Ubuntu or something else?

When I run the usual lsb_release -a command, it says "Ubuntu", but running the same command after having booted from a Lubuntu installation USB-stick gives the same answer, so that is obviously not the answer.

Is there another command that will tell me the answer? (Or some other means?)


P.S. The GUI settings have been changed, so I cannot simply identify the look of the desktop visually.

P.P.S. I found several questions on this topic, but they all seem to answer the question which version of Ubuntu is installed. Note that this is not what I'm asking for.

share|improve this question
    
What do you get with echo $DESKTOP_SESSION? possible duplicated: askubuntu.com/q/72549/62483 –  Lucio Mar 4 at 0:26
1  
@Lucio He doesn't want to know what desktop session he is using, he wants to know what flavour of Ubuntu he is using. –  Seth Mar 4 at 0:46
    
I thought that the major change between those type of distro is the desktop environment/session. –  Lucio Mar 4 at 2:17

1 Answer 1

up vote 3 down vote accepted

The answer may not be totally straightforward because after the system is installed you can mix-and-match different components, including the desktop environment, applications etc. Everything is installed from the common repository so with time it may be difficult to tell what "flavor" of Ubuntu it is.

For example, on my laptop I used to have Ubuntu with Unity, but with time I replaced Unity with KDE and removed most of the default applications. Would you still consider it Ubuntu or is it Kubuntu now?

So maybe a better question to ask is "what distro was originally installed on the machine?"

On 12.04 I think you can check that with

cat /etc/apt/sources.list|grep cdrom

At some point in 13.x series the format of files in /etc/apt has changed, so the above doesn't work anymore, but I think you can find some clues by doing

cat /var/log/installer/media-info

See this question for more details

share|improve this answer
    
On Ubuntu 13.10 I get cat: /var/log/installer/media-info: No such file or directory –  Lucio Mar 4 at 2:21
1  
@Lucio: yeah, the /var/log/installer/media-info is a bit magical - some people reported it existing on their machines, and some don't have it, as you can see from the accepted answer to the question I linked to. The /etc/apt/sources.list used to be more reliable, but the file doesn't exist anymore in modern releases of Ubuntu. The OP was asking about 12.04 though, so should work for him. –  Sergey Mar 4 at 3:22
    
@Sergey yup. You're right. That's a rephrasing of the question which makes it clearer. –  zrajm Mar 4 at 6:45
    
The grep cdrom /etc/apt/sources.list trick worked excellently for me. –  zrajm Mar 4 at 7:40
1  
"The /etc/apt/sources.list used to be more reliable, but the file doesn't exist anymore in modern releases of Ubuntu." the file is and will be always there, without being replaced. It is where APT gets all repositories. –  Braiam Mar 4 at 14:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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