Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Kernel versions [answered]

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
debiantu
Posts: 18
Joined: 2017-03-18 22:41

Kernel versions [answered]

#1 Post by debiantu »

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.

No_windows
Posts: 505
Joined: 2015-08-05 03:03

Re: Kernel versions

#2 Post by No_windows »

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

User avatar
roseway
Posts: 1528
Joined: 2007-12-31 22:50
Location: Kent, UK
Has thanked: 3 times
Been thanked: 4 times

Re: Kernel versions

#3 Post by roseway »

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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Kernel versions

#4 Post by Head_on_a_Stick »

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
deadbang

debiantu
Posts: 18
Joined: 2017-03-18 22:41

Re: Kernel versions

#5 Post by debiantu »

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!

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Kernel versions

#6 Post by Head_on_a_Stick »

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...
deadbang

User avatar
roseway
Posts: 1528
Joined: 2007-12-31 22:50
Location: Kent, UK
Has thanked: 3 times
Been thanked: 4 times

Re: Kernel versions [answered]

#7 Post by roseway »

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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Kernel versions [answered]

#8 Post by Head_on_a_Stick »

^ Ah yes, of course, thanks :)

My ~/.xsessionrc (& ~/.profile) adds /sbin to my user's PATH.
deadbang

Post Reply