Use /proc/version to identify your Linux release

Hi everyone, I'm finally back from my holidays, and simply cannot wait to share some more Unix tips with all of you!

Today I'll talk a bit more about yet another way of learning version information about your Linux OS: the /proc/version file. I mentioned it briefly in one of the previous posts, but would like to finish the explanations.

What you can learn from /proc/version

This file will not show you the name of the actual OS release, but will instead give you specifics about the version of Linux kernel used in your distribution, and confirm the version of a GCC compiler used to build it.

If you cat the /proc/version file, this is what you're going to see (I'm using a RedHat 5.2 system for this):

rhel52# cat /proc/version
Linux version 2.6.18-92.el5 (brewbuilder@ls20-bc2-13.build.redhat.com) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-41)) #1 SMP Tue Apr 29 13:16:15 EDT 2008

In this output, you get to see the following information:

  1. Exact version of the Linux kernel used in your OS: Linux version 2.6.18-92.el5
  2. Name of the user who compiled your kernel, and also a host name where it happened: brewbuilder@ls20-bc2-13.build.redhat.com
  3. Version of the GCC compiler used for building the kernel: gcc version 4.1.2 20071124
  4. Type of the kernel – SMP here means Symmetric MultiProcessing kernel, the one that supports systems with multiple CPUs or multiple cpu cores
  5. Date and time when the kernel was built: Tue Apr 29 13:16:15 EDT 2008

It's absolutely normal that the kernel is older than the overall release of yours. My example above, generated on the RedHat Enterprise Linux 5.2 system (RHEL5.2), shows the kernel birthday to be Apr 29, 2008. But the actual RHEL5.2 release became available to all the customers only a month later, on May 21st 2008 (here's the original RedHat 5.2 announcement).

The reason your kernel is a bit older than the rest of the distribution is because kernel is only one part of the final product you're getting – it may take a while to compile and integrate the rest of the OS before it can be used.

Different ways to find out Linux release information

By now, you should know quite a few ways of confirming release information about your Linux distro. Just to remind you, here they are:

This should be more than enough even for the most curious Linux users. Enjoy!

See also:

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS
  • http://blogs.koolwal.net Kushal Koolwal

    I always wondered how to find out the version of GCC with which ones kernel is compiled. Thank you for clarifying that.

    Do you know what does "4.1.2-41" stands for in the output above? Is that the default version of GCC compiler installed on your system?

  • Pingback: What version?

  • Satya

    Nice info
    Good too see such basic things explained.
    I was looking for SMP definition.
    In the world of computers and linux, there are 100s of abbreviations whcih we may not know in our full lifetime…but good to see someone who explains these…