How to find out wich ubuntu version you are running

There are two simple ways:

Fast, but less verbose

kvaes@ubuntu:~$ cat /etc/issue
Ubuntu 7.04 n l

Verbose, but a tad slower

kvaes@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 7.04
Release: 7.04

I hope this helps… 😉

8 thoughts on “How to find out wich ubuntu version you are running

  1. I was just wondering how someone might do this, the other day. Thank you so much for posting it! 🙂

  2. Hey, thanks mate 🙂 Was just trying to figure out how to do this in Terminal.

  3. This works perfectly but could you explain the two commands and how the version information is obtained?

  4. To know if the installed Ubuntu is of 32 or 64 bits:
    uname -m
    If it shows i686 or i386 it means 32 bits.
    If it shows x86_64 it means 64 bits.

    If the CPU is of 32 bits Ubuntu must be of 32 bits.
    If the CPU is of 64 bits it can work in 64 or 32 bits. So we can choose: Ubuntu can be of 32 bits or of 64 bits.

    To know if the CPU is of 32 or 64 bits:
    a) grep -w lm /proc/cpuinfo
    If we see lm in red is of 64 bits. Otherwise is of 32 bits.
    b) sudo lshw | grep “description: CPU” -A 12 | grep width
    It says clearly what we want to know.

  5. Another way to know if the installed Ubuntu is of 32 or 64 bits:
    getconf LONG_BIT

  6. In the command …
    sudo lshw | grep “description: CPU” -A 12 | grep width
    … the quotation marks have to be vertical so it works.

    Probably they have been converted again in typographic ones. I hope they appear well now (I’m using the HTML code for them: ampersand number sign 34 semicolon):
    sudo lshw | grep "description: CPU" -A 12 | grep width

  7. Thanks. A command for both informations here:

    We can also run …
    lscpu
    … and have a look just to the first 2 lines of the output:
    “Architecture” informs about the installed Linux version: “i686” represents one of 32 bits, while “x86_64” stands for a 64 bits one.
    “CPU op-mode(s)” informs about the CPU. “32-bit” represents one of 32 bits, while “32-bit, 64-bit” or “64-bit” stands for a 64 bits one.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.