Category Archives: linux

Network connectivity on a new CentOS installation

I had recently set up a new CentOS VM (v6.2) on my VirtualBox, but had a tough time configuring it to use the internet connectivity from my host machine. Here is a snapshot of the VirtualBox network settings for the VM:

Screen Shot 2013-06-09 at 4.16.50 PM

After quite a bit of troubleshooting, finally it turned out to be a simple config change. By default, CentOS does not configure the network interfaces on a new installation. I just had to execute the following command to configure the ethernet network interface. It acquired a new IP address and the network connectivity issue got resolved.

$ dhclient -v eth0

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:

VERSION="12.04.2 LTS, Precise Pangolin"
PRETTY_NAME="Ubuntu precise (12.04.2 LTS)"

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

Linux file system

Nice blog post on the Linux file system –