Kernel versions [answered]

New to Debian (Or Linux in general)? Ask your questions here!

Kernel versions [answered]

Postby debiantu » 2017-03-18 23:52

Hello all!

I am a pretty new user to Debian and have used other Linux distributions.

I wanted to ensure that I have the latest version of the kernel that is offered for Jessie.

I'm not sure if I have the latest version. Here's my findings:

On distrowatch.com - it lists kernel version 3.16.7 for Debian 8.

I figure that Debian will pretty much track the latest kernel for the 3.16 line and according to kernel.org - the latest version is 3.16.42. Perhaps that's not reasonable as Debian devs/maintainers want to ensure that it's stable so it has to do testing on newer versions. Am I right? Do the devs/maintainers test newer versions in the same branch?

When I look at the kernel on my computer - I see that simply doing a "uname -r" won't be enough as I get:
3.16.0-4-amd64

But if I do the following:
dpkg -l | grep linux
I get the following:
ii console-setup-linux 1.123 all Linux specific part of console-setup
ii libselinux1:amd64 2.3-2 amd64 SELinux runtime shared libraries
ii libv4l-0:amd64 1.6.0-2 amd64 Collection of video4linux support libraries
ii libv4lconvert0:amd64 1.6.0-2 amd64 Video4linux frame format conversion library
ii linux-base 3.5 all Linux image base package
ii linux-compiler-gcc-4.8-x86 3.16.39-1+deb8u2 amd64 Compiler for Linux on x86 (meta-package)
ii linux-headers-3.16.0-4-amd64 3.16.39-1+deb8u2 amd64 Header files for Linux 3.16.0-4-amd64
ii linux-headers-3.16.0-4-common 3.16.39-1+deb8u2 amd64 Common header files for Linux 3.16.0-4
ii linux-headers-amd64 3.16+63 amd64 Header files for Linux amd64 configuration (meta-package)
ii linux-image-3.16.0-4-amd64 3.16.39-1+deb8u2 amd64 Linux 3.16 for 64-bit PCs
ii linux-image-amd64 3.16+63 amd64 Linux for 64-bit PCs (meta-package)
ii linux-kbuild-3.16 3.16.7-ckt20-1 amd64 Kbuild infrastructure for Linux 3.16
ii linux-libc-dev:amd64 3.16.39-1+deb8u2 amd64 Linux support headers for userspace development
ii util-linux 2.25.2-6 amd64 Miscellaneous system utilities
ii util-linux-locales 2.25.2-6 all Locales files for util-linux


So what kernel am I running? uname -r doesn't match up with any version from "dpkg - l | grep linux"? Which line do I look at from dpkg to determine the exact version I have?

Distrowatch lists 3.16.7 and I do see that in linux-kbuild-3.16 in the second column.

My apologies in the formatting of the output of the dpkg command - I've spent time trying to make it look nice but can't figure it out.

thanks!
Last edited by debiantu on 2017-03-19 12:25, edited 1 time in total.
debiantu
 
Posts: 11
Joined: 2017-03-18 22:41

Re: Kernel versions

Postby No_windows » 2017-03-19 03:15

You want to use code tags when posting:

Code: Select all
uname -a
Linux Holly 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) x86_64 GNU/Linux
No_windows
 
Posts: 371
Joined: 2015-08-05 03:03

Re: Kernel versions

Postby roseway » 2017-03-19 07:01

What perhaps isn't clear to the OP is that uname -r tells you the kernel package version, in this case 3.16.0. This package name is retained for the duration of the 3.16.x series, and at time of this posting the actual kernel contained in the package has reached version 3.16.39, as indicated by uname -a.
Eric
User avatar
roseway
 
Posts: 1465
Joined: 2007-12-31 22:50
Location: Kent, UK

Re: Kernel versions

Postby Head_on_a_Stick » 2017-03-19 09:28

This command gives a clearer answer:
Code: Select all
sysctl kernel.version

From my stretch system:
Code: Select all
Helium: ~ $ sysctl kernel.version
kernel.version = #1 ZEN SMP PREEMPT liquorix 4.9-17 (2017-03-12)
Helium: ~ $

This webpage can be used to check the current version, it will always depend on the latest image available for Debian jessie:

https://packages.debian.org/jessie/linux-image-amd64
“Controlling complexity is the essence of computer programming."Brian Kernighan

Please read before posting How to report a problem
User avatar
Head_on_a_Stick
 
Posts: 6491
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Kernel versions

Postby debiantu » 2017-03-19 12:24

Thank you all! Will use "uname -a"

Head_on_a_stick: tried the sysctl command and couldn't run it.. I see from your "screen capture" that you did it as a regular user. I had to "su -" to the root account and run sysctl from there. I'm guessing you gave your own account sudo rights?

Cheers!
debiantu
 
Posts: 11
Joined: 2017-03-18 22:41

Re: Kernel versions

Postby Head_on_a_Stick » 2017-03-19 12:33

debiantu wrote:Head_on_a_stick: tried the sysctl command and couldn't run it.. I see from your "screen capture" that you did it as a regular user. I had to "su -" to the root account and run sysctl from there. I'm guessing you gave your own account sudo rights?

I don't use `sudo` actually — I create a wheel group and add my user to that and then restrict `su` access to wheel group members (password free) in /etc/pam.d/su
Code: Select all
Helium: ~ $ groups                     
empty audio video games systemd-journal netdev kvm libvirt wheel
Helium: ~ $ sysctl kernel.version       
kernel.version = #1 ZEN SMP PREEMPT liquorix 4.9-17 (2017-03-12)
Helium: ~ $

I presume that would account for it anyway...
“Controlling complexity is the essence of computer programming."Brian Kernighan

Please read before posting How to report a problem
User avatar
Head_on_a_Stick
 
Posts: 6491
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Kernel versions [answered]

Postby roseway » 2017-03-19 17:39

sysctl is in the /sbin directory, and this isn't in the normal user's path. As a normal user, you can execute the command by entering the full path, i.e. /sbin/sysctl kernel.version
Eric
User avatar
roseway
 
Posts: 1465
Joined: 2007-12-31 22:50
Location: Kent, UK

Re: Kernel versions [answered]

Postby Head_on_a_Stick » 2017-03-19 18:04

^ Ah yes, of course, thanks :)

My ~/.xsessionrc (& ~/.profile) adds /sbin to my user's PATH.
“Controlling complexity is the essence of computer programming."Brian Kernighan

Please read before posting How to report a problem
User avatar
Head_on_a_Stick
 
Posts: 6491
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 1 guest

fashionable