Show HN: Kerneltool – A Ubuntu mainline kernel installer

Show HN: Kerneltool – A Ubuntu mainline kernel installer
npm version

A tool to list, download, and install mainline kernels from the Ubuntu mainline repository.

Animated preview

This tool was funded with copious amounts of coffee. If you think it has helped you, and you’re feeling generous, you can always buy me another coffee!


This tool was put together in two days. I’ve done my utmost to make it easy to use and to not have it butcher your system in any way, but please note that my official statement is that this tool only works on my machineβ„’ until further notice.

Due to the nature of this tool, testing with multiple unique installations (undoubtedly like your own since you’re looking into this) is practically impossible. Although I’m always open to suggestions, and your feedback is always welcome.


This tool requires a recent version of Node.js to run.

It has been tested with the current LTS release (v16.13.2) and the latest release (v17.xx).


You need npm on your system.

To run this tool on-the fly, invoke npx kerneltool [command...].

Alternatively, invoke sudo npm install -g kerneltool to install it globally on your system. (not recommended)


about any of these commands by calling them with
the `-h,–help` flag right after the command name.”>
━━━ KernelTool - 1.0.0 ━━━ KernelTool for Ubuntu - 1.0.0 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  $ kerneltool 

━━━ General commands ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  kerneltool cache clear
    Clears the cache.

  kerneltool cache inspect
    Inspects the cache.

  kerneltool download [--repo #0] [-v,--variant #0] [-a,--arch #0] [-o,--overwrite]  [output-directory]
    Download a specific kernel version to the cache. Will optionally copy the .deb packages to an output directory.

  kerneltool install [--repo #0] [-y,--yes]  [variant]
    Install a specific kernel version. This command requires root privileges.

  kerneltool list [--repo #0] [-j,--json] [--after #0] [--before #0] [-A,--archs] [-V,--variants] [-l,--limit #0]
    Display available kernels from the mainline repository.

  kerneltool show [--repo #0] [-j,--json] [-a,--arch #0] [--all] 
    Show the information for a specific kernel version.

You can also print more details about any of these commands by calling them with
the `-h,--help` flag right after the command name.

Additional notes:

  • The only command to require root privileges is kerneltool install. Everything else can be run by a normal user.
  • The cache is not shared amongst users. Running kerneltool download [kernel] as a user and later running sudo kerneltool install [kernel] (as root) will re-download all files from scratch.

A special note about kernels 5.16.x:

Kernel 5.16.x from the mainline repo will not install automatically. You need the libssl3 package on your system, and that’s not currently available for Impish (21.10).

To install the kernel, make sure you install the .deb package manually from jammy first. It works on 21.10 without issue.

A special note for NVIDIA users:

Kernel 5.16.x will not work with the NVIDIA dkms package at the moment. You’ll have to edit/patch the NVIDIA dkms files first. See this thread for more details.

As per the suggestion from that thread: adding the following near the top of /usr/src/nvidia-495.46/nvidia-uvm/uvm_migrate.c after all the #include statements fixed it for me.


P.S: And yes! It’s absolutely worth it. My steam games run so much faster and smoother now.


All contributions are welcome. If you find a problem running it on your system and manage to fix it, please submit a PR.

P.S. Any PRs that touch this line of code will be rejected with extreme prejudice.

License (MIT)

Copyright 2022 Abdullah Ali

Permission is hereby granted, free of charge, to any person obtaining a copy o

NOW WITH OVER +8500 USERS. people can Join Knowasiak for free. Sign up on
Read More

Charlie Layers

Charlie Layers

Fill your life with experiences so you always have a great story to tell