13

I know Ubuntu is based on Debian but I would like to find out if I am running debian or ubuntu.

Uname:

uname -a

Result:Linux test 2.6.18.8-x86_64-linode10 #1 SMP Tue Nov 10 16:29:17 UTC 2009 x86_64 GNU/Linux

Version:

cat /proc/version

Result:Linux version 2.6.18.8-x86_64-linode10 (root@build.linode.com) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #1 SMP Tue Nov 10 16:29:17 UTC 2009

Lsb-release:

lsb_release -a

Result:

Distributor ID: Debian
Description:    Debian GNU/Linux 5.0.10 (lenny)
Release:        5.0.10
Codename:       lenny

So What is it Debian or ubuntu?

UPDATE:

cat /etc/issue:

Result:

Debian GNU/Linux 5.0 (So I can conclusively say it is debian)

tread
  • 356
  • 3
  • 6
  • 21

1 Answers1

11

You should trust lsb_release since both Debian and Ubuntu claim to be LSB compliant. In your example you are running Debian with an Ubuntu-compiled kernel (according to your /proc/version), that's why you see information about both distributions.

yorodm
  • 234
  • 2
  • 3
  • My bad, the Ubuntu part in the output of `/proc/version` refers to `gcc` not the kernel itself. – yorodm Apr 14 '14 at 15:51
  • 1
    @Ramhound: It isn't. If you check `uname`'s output, the kernel version states it was made by Linode so it is them who are using Ubuntu tagged gcc's to do their work. Although my best guess is that the server is running under some virtualization technology like OpenVZ. – yorodm Apr 14 '14 at 16:38
  • 1
    I am inclined to agree with you that it is gcc compiled via ubuntu. However the distribution is actually Debian. The initial answer although it has upvotes, doesn't really have much backing and surely a ubuntu `lsb_release` will show ubuntu and not debian – tread Apr 14 '14 at 18:50
  • If I run your test on one of my own servers I get Ubuntu Precise Pangolin running kernel Linux version 2.6.32-19-pve (root@maui) (gcc version 4.4.5 (Debian 4.4.5-8) ) #1 SMP Wed May 15 07:32:52 CEST 2013. This is a Ubuntu OpenVZ container running under [Proxmox](http://www.proxmox.com/). – yorodm Apr 14 '14 at 18:56