LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-13-2008, 10:48 AM   #1
Deerslayer
Member
 
Registered: May 2005
Distribution: CentOS 7
Posts: 34

Rep: Reputation: 15
How to determine which kernel version I'm using?


Last night, I did a dist-upgrade, which installed Linux version 2.6.18.dfsg.1-18etch1. This version fixed a vulnerability (DSA-1494-2) which had been reported on Feb 11. Then when I looked at the latest vmlinuz, the datestamp was Feb. 10.

I looked for a command to display the kernel version, and all I could find was uname, which just reports "Linux debian 2.6.18-6-686." Is there another command that will report the exact version number, or is there some other way to find it?
 
Old 02-13-2008, 11:01 AM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
You can try dpkg -L | grep linux-image and see if that tells you the exact package.
 
Old 02-13-2008, 11:03 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

uname -vr will show you the kernel version (-v) and it's release (-r)

Example:
Quote:
$ uname -vr
2.6.22.druuna #1 SMP Sat Aug 4 19:06:45 CEST 2007
blue -> -v
green -> -r

Hope this helps.
 
Old 02-13-2008, 11:13 AM   #4
TheSmilingBandit
LQ Newbie
 
Registered: Jan 2007
Location: Frankfurt aM. Germany
Distribution: Debian Lenny
Posts: 22

Rep: Reputation: 15
Actualy, this is a little bit offtopic, but: how can I determine, which IP adresse my dhcp router gave me during the current session? Guess this might be as easy as asking for the kernel version...
 
Old 02-13-2008, 11:21 AM   #5
Deerslayer
Member
 
Registered: May 2005
Distribution: CentOS 7
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pljvaldez View Post
You can try dpkg -L | grep linux-image and see if that tells you the exact package.
Hmm, I tried this and the response was "dpkg-query: --listfiles needs at least one package name argument." I then tried dkpg -L linux-image (yeah, I'm just guessing at this point) and it said that linux-image is not installed.
 
Old 02-13-2008, 11:25 AM   #6
Deerslayer
Member
 
Registered: May 2005
Distribution: CentOS 7
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
Hi,

uname -vr will show you the kernel version (-v) and it's release (-r)

Example:

blue -> -v
green -> -r

Hope this helps.
This seems to show a subset of the info from uname -a. What I need is the part in red: 2.6.18.dfsg.1-18etch1. I think the version that I had before the dist-upgrade was 1-16etch1, IIRC from watching the latest one install.
 
Old 02-13-2008, 11:46 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

The output of uname -r (which is indeed a subset of -a) shows this (my kernel):

2.6.22.druuna

The part in blue is what you are highlighting, but this is something that can be set during kernel compilation and not all people put the correct/complete info there. If this is the case then there is no command to check the actual build.

You could check to see if the appropriate kernel is booted (check grub or lilo file) and also check what is present in /boot (new kernel should be present, older kernels could be present).
 
Old 02-13-2008, 11:49 AM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Quote:
Originally Posted by TheSmilingBandit View Post
Actualy, this is a little bit offtopic, but: how can I determine, which IP adresse my dhcp router gave me during the current session? Guess this might be as easy as asking for the kernel version...
This is indeed (very) off topic. Please search the forum and google first and if that doesn't help start a seperate thread. BTW: Take a look at the ifconfig command
 
Old 02-13-2008, 12:24 PM   #9
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Quote:
Originally Posted by Deerslayer View Post
Hmm, I tried this and the response was "dpkg-query: --listfiles needs at least one package name argument." I then tried dkpg -L linux-image (yeah, I'm just guessing at this point) and it said that linux-image is not installed.
You probably have to do dpkg -L 'linux*' instead. Sorry my first command didn't work, I'm not at my debian box...
 
Old 02-13-2008, 01:12 PM   #10
TheSmilingBandit
LQ Newbie
 
Registered: Jan 2007
Location: Frankfurt aM. Germany
Distribution: Debian Lenny
Posts: 22

Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
Hi,



This is indeed (very) off topic. Please search the forum and google first and if that doesn't help start a seperate thread. BTW: Take a look at the ifconfig command
Sy for getting offtopic, my post can be deleted, if nessecary. It is ifconfig -a in case someone want to know. Thought it might somehow fit into this, sorry again
 
Old 02-13-2008, 02:00 PM   #11
Deerslayer
Member
 
Registered: May 2005
Distribution: CentOS 7
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
Hi,

The output of uname -r (which is indeed a subset of -a) shows this (my kernel):

2.6.22.druuna

The part in blue is what you are highlighting, but this is something that can be set during kernel compilation and not all people put the correct/complete info there. If this is the case then there is no command to check the actual build.

You could check to see if the appropriate kernel is booted (check grub or lilo file) and also check what is present in /boot (new kernel should be present, older kernels could be present).
From uname, the part of the name of my kernel that seems to correspond to 'druuna' in your kernel is '-6-686'. This is unchanged from the kernel I had before the dist-upgrade. There are two kernels in /boot, the other being '-5-686', and both are available from grub. That all looks OK, but I was hoping that there was some way to determine the exact build... certainly Debian puts that in there somewhere?

The only thing that seems odd is the datestamp. Since the notification on debian.org said that the .1-18etch1 kernel fixed a vulnerability that was reported on Feb 11, and aptitude seemed to install the new kernel OK, I don't understand why the datestamp on the newest kernel is Feb 10. I probably don't have anything to worry about, but now that I started this I want to see it through.
 
Old 02-13-2008, 03:17 PM   #12
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
I just had a thought, maybe you can check the kernel config file in /boot. Just read through it with more as the relevant information should be near the top of the config file.
 
Old 02-13-2008, 03:25 PM   #13
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 60
What about this (untested, since I'm not at my Debian machine)?
Code:
apt-cache policy linux-image-`uname -r`
 
Old 02-13-2008, 03:39 PM   #14
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
that should be a direct hit..

Code:
it-etch:~# apt-cache policy linux-image-`uname -r`

linux-image-2.6.18-6-686:
  Installed: 2.6.18.dfsg.1-18etch1
  Candidate: 2.6.18.dfsg.1-18etch1
  Version table:
 *** 2.6.18.dfsg.1-18etch1 0
        500 http://security.debian.org etch/updates/main Packages
        100 /var/lib/dpkg/status
 
Old 02-13-2008, 03:42 PM   #15
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
You got caught with the way Debian allows you to keep your system up to date: it has a general linux-image package, which depends on the latest available kernelpackage. In my case, it's called 'linux-image-amd64' as I have 64 bit AMD hardware (and 64 bit Debian Etch system). Yours could be like 'linux-image-6-686' or something similar.

I suggest to start Synaptic or aptitude and enter 'linux-image' as a search string. Look around in the results, the packages installed will show up. (use the n key in aptitude to cycle through the results)

Btw, you did update the package list first, did you? Click on 'reload' in Synaptic or press u in aptitude. Then click 'mark all upgrades' in Synaptic or U (yes, capital u) in aptitude to check for updates. In Synaptic, click 'apply' or in aptitude: press g twice. Now your system updates itself (I know you'll probably already know this, but new users probably not )
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to determine kernel/Xorg version numbers? pbb Linux - Newbie 7 04-27-2016 02:41 AM
How do I determine the kernel version I am currently running? sr_25 Linux - Newbie 5 07-30-2006 08:05 PM
I would like to be able to determine my kernel version. Gueron Linux - Newbie 3 10-10-2005 02:24 PM
determine kernel version linuxmandrake Mandriva 1 05-28-2005 05:38 AM
How to determine Kernel version stonesino Linux - General 2 03-13-2004 01:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration