With the following command, I can list all the installed kernel package:$ dpkg -l | grep linux-imageWith the following command, I get for instance the version of the current kernel used:$ uname -rHowever, my needs is to just display in a terminal, the Debian package name corresponding of the current loaded kernel.As multiples packages names can have the same version, it is difficult to identify uniquely a particular kernel with the previous commands.So... Do you have an idea to get the package name of the current kernel ?
Debian: How to get the current loaded kernel package name?
shell;debian;linux kernel
Use this:$ dpkg --get-selections | grep -o ^linux-image-$(uname -r)linux-image-3.13.0-32-genericor$ dpkg -l | grep -o linux-image-$(uname -r)linux-image-3.13.0-32-genericEDIT: If you have multiple versions of the same kernel release, run the following bash script:#!/bin/bashrel=$(uname -r)ver=$(uname -v)current=${rel%-*}.${ver:1:2}echo $(dpkg -l | grep -Po linux-image-${rel}(?=\s+${current}))