≡ Menu

linux kernel version

Video: Who Writes Linux Kernel?

Linux kernel is the most prominent examples of free and open source software. The Linux kernel has received contributions from thousands of programmers and companies around the world. This professional video from the Linux foundation provides a quick insight into Linux building procedure. This is a powerful and inspiring story of how Linux has become a volunteer-driven phenomenon.
[click to continue…]

Download of the day: Linux kernel 2.6.24

The Linux kernel version 2.6.24 has been released and available for download. From the announcement:

The release is out there (both git trees and as tarballs/patches), and for the next week many kernel developers will be at (or flying into/out of) LCA in Melbourne, so let's hope it's a good one. Nothing earth-shattering happened since -rc8, although the new set of ACPI blacklist entries and some network driver updates makes the diffstat show that there was more than the random sprinkling of one-liners all over the tree.

Download Linux kernel 2.6.24

=> Visit official kernel website to grab latest version. You may find our kernel compiling instructions useful.

Linux command to gathers up information about a Linux system

If you are developing an application for Linux desktop and would like to automatically find out more information about system, use the following commands in shell scripts to gather information about system. Recently I was involved in project where I need to collect information about running GUI, browser and other information such as disk space, running kernel etc.

Find out KDE Desktop version:

konqueror --version

Find out Gnome Desktop version:

gnome-panel --version

Find out Mozilla browser version:

mozilla --version

Find out Firefox browser version:

firefox --version

Find out current Language:

set | egrep '^(LANG|LC_)'

Find out disk space usage:

df -h

Find/Estimate file space usage:

du -h

Find out version of Linux glibc:

ls -l /lib/libc-*.so /lib/libc.so*

Find out user limits:

ulimit -a

Find out installed device drivers (modules)


Find out information about an X server:


It can find out:

  • Name of display:
  • Version number
  • Vendor name (such as The XFree86 Project)
  • Vendor release number
  • And XFree86 version number

Find out information about Linux CPU

cat /proc/cpuinfo

Find out information about Linux Memory

cat /proc/meminfo


free -m


free -g

Find out user shell name:

ps -p $$ | tail -1 | awk '{ print $4 }'

Dump Linux kernel variables

/sbin/sysctl -a

Find out running Linux kernel version:

uname -mrs
uname -a
cat /proc/version

Dump or display memory information and swap information:

free -m

Network card and IP address information:

ifconfig -a
ifconfig -a|less

Debian / Ubuntu Linux network configuration file (all interface eth0,eth1,...ethN)

more /etc/network/interfaces

Redhat / CentOS / Fedora Linux network configuration file (eth0)

more  /etc/sysconfig/network-scripts/ifcfg-eth0

Note replace eth1 for 2nd network card and so on.

Display routing information

route -n

Display list of all open ports

netstat -tulpn

View login related logs

tail -f /var/log/secure
vi /var/log/secure
grep 'something' /var/log/secure

View mail server related logs

tail -f /var/log/maillog
vi /var/log/maillog
grep 'something' /var/log/maillog

Find how long the system has been running


Show who is logged on and what they are doing


Display list of tasks


Display all running process

ps aux
ps aux | grep process-name

Display list of all installed software on Redhat / CentOS / Fedora

rpm -qa
rpm -qa | grep 'software-name'
rpm -qa | less

Display list of all installed software on Debian / Ubuntu

dpkg --list

Once information collected it can be easily send as an email to help desk. You can use all above command to gathers information about a remote Linux system over secure ssh session (see related functions that gathers up information about a Linux and FreeBSD system). Best part is all above commands runs in non privileged mode.

How to: Compile Linux kernel 2.6

Compiling custom kernel has its own advantages and disadvantages. However, new Linux user / admin find it difficult to compile Linux kernel. Compiling kernel needs to understand few things and then just type couple of commands. This step by step howto covers compiling Linux kernel version 2.6.xx under Debian GNU Linux. However, instructions remains the same for any other distribution except for apt-get command.

Step # 1 Get Latest Linux kernel code

Visit http://kernel.org/ and download the latest source code. File name would be linux-x.y.z.tar.bz2, where x.y.z is actual version number. For example file inux-2.6.25.tar.bz2 represents 2.6.25 kernel version. Use wget command to download kernel source code:
$ cd /tmp
$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-x.y.z.tar.bz2

Note: Replace x.y.z with actual version number.

Step # 2 Extract tar (.tar.bz3) file

Type the following command:
# tar -xjvf linux-2.6.25.tar.bz2 -C /usr/src
# cd /usr/src

Step # 3 Configure kernel

Before you configure kernel make sure you have development tools (gcc compilers and related tools) are installed on your system. If gcc compiler and tools are not installed then use apt-get command under Debian Linux to install development tools.
# apt-get install gcc

Now you can start kernel configuration by typing any one of the command:

  • $ make menuconfig - Text based color menus, radiolists & dialogs. This option also useful on remote server if you wanna compile kernel remotely.
  • $ make xconfig - X windows (Qt) based configuration tool, works best under KDE desktop
  • $ make gconfig - X windows (Gtk) based configuration tool, works best under Gnome Dekstop.

For example make menuconfig command launches following screen:
$ make menuconfig

You have to select different options as per your need. Each configuration option has HELP button associated with it so select help button to get help.

Step # 4 Compile kernel

Start compiling to create a compressed kernel image, enter:
$ make
Start compiling to kernel modules:
$ make modules

Install kernel modules (become a root user, use su command):
$ su -
# make modules_install

Step # 5 Install kernel

So far we have compiled kernel and installed kernel modules. It is time to install kernel itself.
# make install

It will install three files into /boot directory as well as modification to your kernel grub configuration file:

  • System.map-2.6.25
  • config-2.6.25
  • vmlinuz-2.6.25

Step # 6: Create an initrd image

Type the following command at a shell prompt:
# cd /boot
# mkinitrd -o initrd.img-2.6.25 2.6.25

initrd images contains device driver which needed to load rest of the operating system later on. Not all computer requires initrd, but it is safe to create one.

Step # 7 Modify Grub configuration file - /boot/grub/menu.lst

Open file using vi:
# vi /boot/grub/menu.lst

title           Debian GNU/Linux, kernel 2.6.25 Default
root            (hd0,0)
kernel          /boot/vmlinuz root=/dev/hdb1 ro
initrd          /boot/initrd.img-2.6.25

Remember to setup correct root=/dev/hdXX device. Save and close the file. If you think editing and writing all lines by hand is too much for you, try out update-grub command to update the lines for each kernel in /boot/grub/menu.lst file. Just type the command:
# update-grub
Neat. Huh?

Step # 8 : Reboot computer and boot into your new kernel

Just issue reboot command:
# reboot
For more information see:

  • Our Exploring Linux kernel article and Compiling Linux Kernel module only.
  • Official README file has more information on kernel and software requirement to compile it. This file is kernel source directory tree.
  • Documentation/ directory has interesting kernel documentation for you in kernel source tree.