When you are running a command line only version of Linux, on a server for instance, keeping up to date can fall to the wayside in your daily use as there is no nagging icon to tell you there are updates. One of the most useful directories you can peek around in is the ‘/proc’ directory, just off of root. This directory contains text files that have information ranging form memory stats, swap information, cpu information, cryptographic information, and even…the version of your current Linux Kernel. This can be useful when you are preparing to apply a kernel patch or upgrade to your system.

To do this we are going to use the ‘cat‘ command in Linux. This is short for conCATenate, meaning to stitch together, however we are going to use the command to simply display some text from a file.

The following will give you a nice printout of the exact Kernel version you are running on:

$ cat /proc/version
Linux version 2.6.38-8-generic (buildd@allspice) (gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu3) ) #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011

This shows what version I am using, which is currently Linux Mint 11 (based on Ubuntu)

These types of tools can be really useful when combined with applications like Conky, the desktop based system information display.

A few other useful files you can ‘cat’ are:

# Memory Information
$ cat /proc/meminfo

# Version Signature
$ cat /proc/version_signature

# Swap Partition Information
$ cat /proc/swaps

# CPU Information
$ cat /proc/cpuinfo

Posted by Chris Klosowski

Chris Klosowski is the Director of Technology at Sandhills Development, LLC, creators of fine WordPress plugins, and ecommerce solutions.

4 Comments

  1. Oh my goodness! Incredible article dude! Thank you, However
    I am going through difficulties with your RSS.

    I don’t understand why I cannot subscribe to it.
    Is there anybody else having the same RSS issues?
    Anyone who knows the solution can you kindly
    respond? Thanks!!

    Reply

  2. Can I just say what a comfort to uncover somebody
    that actually knows what they’re discussing on the net. You certainly know how to bring a problem to light and
    make it important. More people must read this and understand this side of your story.

    I can’t believe you’re not more popular given that you surely have the gift.

    Reply

  3. Hello there! I could have sworn I’ve been to this site before but after
    looking at a few of the posts I realized it’s new to me.

    Anyhow, I’m certainly delighted I found it and I’ll be book-marking it and checking back often!

    Reply

Leave a reply

Your email address will not be published. Required fields are marked *