Different Ways to Know Your Linux Version ?

Have you ever been wondering, What Linux distribution / Version do you actually use ?

 So, in this post, I wanted to note down few of the ways to know 'Linux Distribution/ Version' of yours Computer Using Terminal.


First, Create a shell using Terminal. If you're unfamiliar with 'Terminal', Terminal to Linux is equivalent to Command Prompt for Windows. But, terminal is much more useful than Windows cmd. Simply, Terminal is a command Line Interface which provides user interaction with (Kernal). Go to Dash & Just type Terminal & run it.

Try following Methods.

$ cat /etc/*-release

It returns following output for me. But, it depends on the version/ Distribution of your Linux.

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.1 LTS"
NAME="Ubuntu"
VERSION="12.04.1 LTS, Precise Pangolin"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu precise (12.04.1 LTS)"
VERSION_ID="12.04"


Or try using cat like follows. Cat Command is used to file contents in the standard output.

$ cat /proc/version

This will  return an output like this;

Linux version 3.2.0-36-generic-pae (buildd@lamiak) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #57-Ubuntu SMP Tue Jan 8 22:01:06 UTC 2013

As usual it depends, some times you'd get different version name. But, it should have a similar format to this.


Or try using lsb_release command. lsb_release is used to show distribution specific information.

$ lsb_release -a

It returns an output similar to the one given below.

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise

Even though It has been described before in an older post The use of uname command will return a series of information about your Linux Kernal Version, Name & CPU Version of your computer.

$ uname -a

No comments: