Find out the Linux distribution name, version and Kernel details

Sometimes, You might forget the running Linux distribution version, name, and Kernel details in  your VPS. Probably, you will get those details easily from the Settings menu if your system has a GUI. But in CLI mode, it is bit difficult for beginners to find out these details. No worries, Here I come up with simple, yet useful commands that will help you to achieve this goal.

1. Find out Linux distribution name, version etc.

There are many methods can be used to find out what OS is running on in your VPS.

Method 1:

Fire up your Terminal and run the following command:

cat /etc/*-release

Sample output from CentOS 7:

CentOS Linux release 7.0.1406 (Core) 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CentOS Linux release 7.0.1406 (Core) 
CentOS Linux release 7.0.1406 (Core)

Sample output from Ubuntu 14.04:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"
NAME="Ubuntu"
VERSION="14.04.3 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.3 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
Method 2:

The following command will also get your distribution details.

cat /etc/issue

Sample output from Ubuntu 14.04:

Ubuntu 14.04.3 LTS n l
Method 3:

The following command will get you the distribution details in DEB based systems like Debian and Ubuntu.

lsb_release -a

Sample output:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty

2. Find out Kernel details

Method 1:

To find out your Linux kernel details, run the following command from your Terminal.

uname -a

Sample output in CentOS 7:

Linux server.ostechnix.com 3.10.0-123.9.3.el7.x86_64 #1 SMP Thu Nov 6 15:06:03 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Sample output in Ubuntu 14.04:

Linux ostechnix 3.13.0-62-generic #102-Ubuntu SMP Tue Aug 11 14:29:36 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Or,

uname -mrs

Sample output:

Linux 3.13.0-62-generic x86_64

Where,

  • Linux – Kernel name
  • 3.13.0-62-generic – Kernel version
  • x86_64 – System hardware architecture (i.e 64 bit system)

For more details about uname command, refer the man page.

man uname
Method 2:

From your Terminal, run the following command:

cat /proc/version

Sample output from CentOS 7:

Linux version 3.10.0-123.9.3.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Thu Nov 6 15:06:03 UTC 2014

Sample output from Ubuntu 14.04:

Linux version 3.13.0-62-generic (buildd@lgw01-59) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #102-Ubuntu SMP Tue Aug 11 14:29:36 UTC 2015

That’s it. I hope you have learnt how to find out the running Linux distribution name, version and Kernel details. Pass it on to your friends and colleagues.

Cheers!

You may also like...

  • VIKAS TOKAS

    Dear Sir,

    My Company name is TIME EDUCATION PVT LTD
    And i am working as a IT EXECUTIVE here.
    I just want to know about ubuntu server 15.04 installation and guidance for network PC’s operating.

    • That’s great. But I couldn’t understand your reply. What exactly you want me to do? Thanks for stopping by.