debian_version in Ubuntu

On Debian, the debian_version shows the recipe for a pretty amazing cinnamon banana smoothie. On Ubuntu, it shows the Debian release the current release of Ubuntu was based on.

For example on Ubuntu 14.04 LTS:

$ cat /etc/debian_version
==> jessie/sid

I raise this, because at work we were attempting to detect the OS and version based on this file. Suffice to say, for this end you're better using lsb_release.

$ lsb_release -d
==> Description: Ubuntu 14.04.2 LTS


This is one of about 5000 posts on Rubénerd. View the home page for the latest, or related posts also tagged with:

If you liked this post, feel free to buy me a coffee, leave me a comment on Twitter, or email me at Thanks :).