Linux distro and kernel details

Lately, I have been working with different Linux distros, and two of the most common tasks have been to figure out:

  1. the particular distro installed on the VM
  2. the Linux kernel version

This might be trivial for people working on Linux on a day-to-day basis, but for somebody new to Linux trying to troubleshoot issues this might be of some help.

To figure out the Linux distro running on the machine

Execute the following command:

$ cat /etc/*-release

Here is a sample output from my Ubuntu instance:

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

Another one from my CentOS instance:

CentOS release 6.2 (Final)
CentOS release 6.2 (Final)
CentOS release 6.2 (Final)

To figure out the Linux kernel version

Execute the following command:

$ uname -mrs

Here is a sample output from my Ubuntu instance:

Linux 3.2.0-40-generic-pae i686

And another one from my CentOS instance:

Linux 2.6.32-220.e16.x86_64 x86_64
Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: