How can I determine the version of the running kernel?

1

I just realized, the kernels I have immediate access to do have the version string stored uncompressed amongst the headers. strings uImage | grep 2.6 ought to be good enough for any 2.6 kernel which covers pretty much everything in the last 5+ years).

(original answer follows)

It's theoretically possible, but not entirely trivial.

Modern Linux kernel versions use a format called bzImage (for x86/x86_64, YMMV on other platforms). It actually consists of an ELF header and some other minutia (like a bit of decompression code) followed by, yes, a compressed image of the actual kernel.

Traditionally, the compression algorithm was zlib (contrary to popular misconception, 'bzImage' did not stand for "bzipped image", but for "big zImage" -- the original zImage format not being able to handle large kernels), though versions after 2.6.30 also support bzip2 and LZMA.

What you'll probably have to do is determine exactly where the compressed data starts...

0 0
2

Welcome to the Kernel Frequently Asked Questions (FAQ)! The aim of this page is to provide an list of common questions that we get. We encourage you to update this document when something is missing so it becomes a core source of information for the project. Each question has its own page which are listed on the Kernel/FAQEdit page, which also contains guidance on editing the FAQ.

Something is wrong and I do not know where to start?

If you have specific symptoms you might like to look at the Kernel/Debugging/Symptom symptom based debugging devices. Debugging strategies for various scenarios can be found in Kernel/Debugging.

I have a kernel problem where do I go?

If you have a problem which is related to the kernel you should visit the #ubuntu-kernel IRC channel on FreeNode (See How do I find the kernel team?).

I have problems with Ubuntu where do I go?

If you have general issues you should visit the #ubuntu IRC channel on FreeNode,...

0 0
3

Poshpets.org (10 seconds ago)

Autoprostavka.com (5 seconds ago)

Sarthiworld.com (16 seconds ago)

Hrconnect.com (17 seconds ago)

The-lawhub.com (5 seconds ago)

Bayridgetoyota.com (47 seconds ago)

Skinzwear.com (5 seconds ago)

Oyaide.pro (8 seconds ago)

Mcssl.com (11 seconds ago)

Darkcategories.com (24 seconds ago)

Bbps.org (29 seconds ago)

Clickacanada.com (1 seconds ago)

Projectfitnessaz.com (26 seconds ago)

Thechophouse.com (25 seconds ago)

Ruesd.net (0 seconds ago)

Bangaloreonline.com (16 seconds ago)

028cht.com (21 seconds ago)

Bsninfotech.net (34 seconds ago)

My70sradio.com (6 seconds ago)

Elitereputations.com (18 seconds...

0 0
4

How can I determine the version of the running kernel?

uname -a and uname -r will give you the information of the kernel used.

The official version of an Ubuntu kernel is found in the /proc/version_signature file (mainline kernels may lack this file, in which case uname -r is sufficient).

This file contains both the full Ubuntu version of the kernel and the mainline version on which it is based. The first field is always Ubuntu, the second field is the Ubuntu kernel version, and the final field is the upstream version:

$ cat /proc/version_signature Ubuntu 2.6.35-6.9-generic 2.6.35-rc3

This and many questions just like it are answered in Ubuntu Kernel Team's wiki specifically the FAQ.

if you don't want to open a terminal, you can view your kernel version using gnome-system-monitor. Look for the system monitor in the menu and look in the first tab System.

You can use the two following commands:

uname -r for version 3.5.0.17-genric...
0 0
5

There is no cross-distribution way. However:

Redhat and friends: Test for /etc/redhat-release, check contents Debian: Test for /etc/debian_version, check contents Mandriva and friends: Test for /etc/version, check contents Slackware: Test for /etc/slackware-version, check contents

Etc. Generally speaking, check for /etc/*-release and /etc/*-version.

Edit: Found an old (1+ years) bash script of mine lying around that I must have cobbled together over the years (it has an impressive CVS log going back 6 years.) It might not work properly anymore as-is and I can't be bothered to find installed distros to test against, but it should provide you with a good starting point. It works fine on CentOS, Fedora and Gentoo. gyaresu tested it successfully on Debian Lenny.

#!/bin/bash get_distribution_type() { local dtype # Assume unknown dtype="unknown" # First test against Fedora / RHEL / CentOS / generic Redhat derivative if [ -r /etc/rc.d/init.d/functions ];...
0 0
6

The kernel is universally detected with uname:

$ uname -or 2.6.18-128.el5 GNU/Linux

There really isn't a cross-distribution way to determine what distribution and version you're on. There have been attempts to make this consistent, but ultimately it varies, unfortunately. LSB tools provide this information, but ironically aren't installed by default everywhere. Example on an Ubuntu 9.04 system with the lsb-release package installed:

$ lsb_release -irc Distributor ID: Ubuntu Release: 9.04 Codename: jaunty

Otherwise, the closest widely-available method is checking /etc/something-release files. These exist on most of the common platforms, and on their derivatives (i.e., Red Hat and CentOS).

Here are some examples.

Ubuntu has /etc/lsb-release:

$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=9.04 DISTRIB_CODENAME=jaunty DISTRIB_DESCRIPTION="Ubuntu 9.04"

But Debian has /etc/debian_version:

$ cat /etc/debian_version 5.0.2

Fedora,...

0 0
7

Thanks. We'll let you know when a new response is added.

Start with these two commands:

myuser@mysys ~ $ cat /etc/issue Linux Mint 17.1 Rebecca myuser@mysys ~ $ uname -r 3.13.0-37-generic

Both should work almost everywhere. The first says I’m running {Linux Mint 17.1 Rebecca}, and the second tells the kernel version.

As long as those work, you have what you want; but many distros allow more. You can try:

myuser@mysys ~ $ cat /etc/*release

Hard to be sure what you might see. Try it and compare to the first command above to get a feel for the items returned, if it works on a given distro.

And also try this version for kernel info:

myuser@mysys ~ $ uname -a

Again, compare to the version above to see what extra info it might...

0 0
8

There are several ways of knowing the version of Linux you are running on your machine as well as your distribution name and kernel version plus some extra information that you may probably want to have in mind or at your fingertips.

Therefore, in this simple yet important guide for new Linux users, I will show you how to do just that. Doing this may seem to be relatively easy task, however, having a good knowledge of your system is always a recommended practice for a good number of reasons including installing and running the appropriate packages for your Linux version, for easy reporting of bugs coupled with many more.

Suggested Read: 5 Ways to Find Out Linux System is 32-bit or 64-bit

With that said, let us proceed to how you can figure out information about your Linux distribution.

Find Out Linux Kernel Version

We will use uname command, which is used to print your Linux system information such as kernel version and release name, network...

0 0
9

It happens many times. Often new Linux system administrators and user(s) get confused. They are not able to determine if Linux system can run a 64 bit kernel version (and application) or not. There is simple way to find out:

(a) Ask your hardware vendor

(b) Find out yourself by reading manuals

(c) Or run the following commands:
Here is output from one of my production Dual Opteron server:
$ less /proc/cpuinfo
Output:

processor : 0 vendor_id : AuthenticAMD cpu family : 15 model : 5 model name : AMD Opteron (tm) Processor 848 stepping : 10 cpu MHz : 2197.161 cache size : 1024 KB fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow bogomips : 4308.99 TLB size : 1088 4K pages clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48...
0 0
10

Hi Everyone,

I hope you are doing well.

Let talk today some this kind of interesting question:


How can I determine whether a Kernel Linux version is supported on which ClearCase Version+Fix?

For instance: If I'm running

2.6.32-279.el6

kernel version and go to:

"Rational ClearCase System Requirements List" ( http://www-01.ibm.com/support/docview.wss?uid=swg27008776 ) I can see only the list of Linux distributions versions that are supported.

The reason of this is, when ClearCase starts to support a Linux Distro version (for instance Ubuntu 12.04 LTS, Red Hat 6.3 or SuSE 11 Sp2), is expected to
have all Kernel Versions - officially provided by the vendors to each distribution - supported as well.

Given the above, what I need to verify is whether my kernel version actually belongs to a Linux Distro version supported by ClearCase.

On my example if I browse to the Red Hat link below (on References), I'll...

0 0
11

I'm trying to track down a kernel binary; is there a way to determine the version (build string) of a Linux 'uImage' binary?

Running

strings uImage

piped into various trailing grep statements leads me to think I'm dealing with a compressed image...

I just realized, the kernels I have immediate access to do have the version string stored uncompressed amongst the headers. strings uImage | grep 2.6 ought to be good enough for any 2.6 kernel which covers pretty much everything in the last 5+ years).

(original answer follows)

It's theoretically possible, but not entirely trivial.

Modern Linux kernel versions use a format called bzImage (for x86/x86_64, YMMV on other platforms). It actually consists of an ELF header and some other minutia (like a bit of decompression code) followed by, yes, a compressed image of the actual kernel.

Traditionally, the compression algorithm was zlib (contrary to popular misconception, 'bzImage' did not stand...

0 0
12

It can be useful to know the version number of the kernel (i.e., the core of the operating system) on a particular Linux system. Not only is it instructive in itself, but it can also be helpful in diagnosing and upgrading systems because each release of the kernel contains some differences, sometimes minor and sometimes substantial.

Fortunately, it is extremely easy to obtain this information, and, in fact, there is a choice of at least five ways to do it. Moreover, each of these techniques can also be used, with slight modification, to obtain additional information about a system.

Perhaps the easiest is to use the uname command (which reports basic information about a system's hardware and software) with its -r option, that is,

uname -r

This method has the advantages that only a minimal amount of typing is required and that it provides just information about the kernel with no extra output to search through.

A second way is to look at the...

0 0