↑ ↓ select, Enter open, Esc close

Show the running kernel and installed kernels

user@server
uname -r && dpkg --list 'linux-image-[0-9]*' | awk '/^ii/ {print $2, $3}'

The first line is the currently running kernel, followed by all installed kernel packages with their versions. If a newer package is installed than the running kernel, the server has not been rebooted since the update. Many old kernels suggest that apt autoremove has not run in a long time.

Note: On servers with a provider kernel (such as some VPS with OpenVZ), the running kernel does not appear in the package list.

Also searched as

  • which kernel version is running
  • list installed kernels
  • is the new kernel running yet

Related one-liners

All in System and hardware

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.