Linux Kernel Manager — build, install, and manage kernels across all major distros and architectures
Project description
lkm — Linux Kernel Manager
Install, build, and manage Linux kernels across all major distributions and CPU architectures from a single CLI or GUI.
Merges lkf (Linux Kernel Framework — shell build pipeline) and ukm (Universal Kernel Manager — runtime management) into one tool covering the full kernel lifecycle:
fetch → patch → configure → compile → package → install → hold → remove
Kernel sources
| Source | Architectures |
|---|---|
| Ubuntu Mainline PPA | amd64, arm64, armhf, ppc64el, s390x, i386 |
| XanMod | amd64 (v1–v4, edge, lts, rt) |
| Liquorix | amd64 |
| Distro-native (via system package manager) | all |
| Gentoo source compilation | all |
| Local file (.deb / .rpm / .pkg.tar.* / .apk / .xbps) | all |
| lkf build (compile from source via lkf profiles) | all |
Distributions supported
Any distro using one of these package managers:
| Package manager | Distros |
|---|---|
apt |
Debian, Ubuntu, Mint, Pop!_OS, Kali, Kubuntu, Xubuntu, Lubuntu, Devuan, MX Linux, antiX, Zorin, elementary, KDE neon, SparkyLinux, BunsenLabs, Parrot, Proxmox, PikaOS, Bodhi, Lite, Emmabuntüs, Voyager, Linuxfx, Kodachi, AV Linux, wattOS, Feren, Peppermint, Q4OS, Ubuntu MATE, Ubuntu Studio, DragonOS, … |
pacman |
Arch, Manjaro, EndeavourOS, CachyOS, Artix, RebornOS, ArchBang, Archcraft, Bluestar, Mabox, … |
dnf |
Fedora, RHEL, AlmaLinux, Rocky, Nobara, Ultramarine, Bazzite, Oracle, Red Hat, … |
zypper |
openSUSE Leap, openSUSE Tumbleweed, SLES, Regata, … |
apk |
Alpine Linux |
portage |
Gentoo |
xbps |
Void Linux |
nix |
NixOS |
Install
# CLI only
pip install lkm
# GUI (PySide6 — recommended, LGPL)
pip install "lkm[pyside6]"
# GUI (PyQt6 — alternative, GPL)
pip install "lkm[pyqt6]"
To force a specific Qt binding at runtime:
LKM_QT=PyQt6 lkm-gui
CLI usage
Runtime management
lkm list # all kernels from all sources
lkm list --family=xanmod # filter by family
lkm list --installed # installed only
lkm list --json # machine-readable output
lkm list --refresh # force re-fetch remote indexes
lkm install 6.12.0 # install by version
lkm install 6.12.0 --flavor=rt # install specific flavor
lkm install 6.12.0 --provider=xanmod
lkm install --local ./linux-image-6.12.0_amd64.deb
lkm remove 6.8.0
lkm remove 6.8.0 --purge # also remove config files
lkm hold 6.12.0 # pin kernel (excluded from auto-upgrades)
lkm unhold 6.12.0
lkm note 6.12.0 "stable, use this" # attach a note to a kernel
lkm remove-old # remove all but running + most recent
lkm remove-old --keep=2 # keep 2 most recent
lkm providers # list available providers
lkm info # system info (distro, arch, running kernel)
Building with lkf
Requires lkf to be installed (make install from the lkf repo).
# Build from a remix.toml profile and install the result
lkm remix --file ~/.local/share/lkf/profiles/gaming.toml --install
# Build mainline 6.12 with Clang/LLVM + thin LTO, produce a .deb, then install
lkm build --version 6.12 --flavor mainline --llvm --lto thin --output deb --install
# Build without installing (package lands in ~/.cache/lkm/lkf-output/)
lkm build --version 6.12 --flavor tkg --arch aarch64 --output rpm
GUI
lkm-gui
The GUI shows a tabbed window — one tab per kernel family plus an All tab. Each tab has a search bar, family/status filters, a sortable kernel table, and a live log panel at the bottom.
Right-click any kernel row for: Install / Remove / Hold / Unhold / Edit Note.
Build tab
The ⚙ Build… toolbar button opens the lkf build dialog with two modes:
- Profile — pick a
remix.tomlfrom discovered lkf profiles (or browse for one). Streamslkf remixoutput live. - Custom — specify version, flavor, arch, compiler flags (LLVM/LTO), and output format. Streams
lkf buildoutput live.
On a successful build, lkm offers to install the resulting package immediately.
Architecture
lkm/
├── qt.py # PySide6/PyQt6 compatibility shim
├── core/
│ ├── kernel.py # KernelEntry, KernelVersion, KernelFamily, KernelStatus
│ ├── system.py # distro/arch/package-manager detection
│ ├── manager.py # KernelManager — central coordinator, state persistence
│ ├── backends/ # Package manager backends
│ │ ├── apt.py # Debian / Ubuntu / Mint / …
│ │ ├── pacman.py # Arch / Manjaro / CachyOS / …
│ │ ├── dnf.py # Fedora / RHEL / AlmaLinux / …
│ │ ├── zypper.py # openSUSE
│ │ ├── apk.py # Alpine
│ │ ├── portage.py # Gentoo
│ │ ├── xbps.py # Void Linux
│ │ └── nix.py # NixOS
│ └── providers/ # Kernel source providers
│ ├── mainline.py # Ubuntu Mainline PPA
│ ├── xanmod.py # XanMod
│ ├── liquorix.py # Liquorix
│ ├── distro.py # Distro-native packages
│ ├── local_file.py # Pre-built local package files
│ ├── lkf_build.py # lkf build pipeline bridge
│ ├── gentoo.py # Gentoo source compilation
│ ├── void.py # Void Linux (xbps)
│ └── nixos.py # NixOS (declarative)
├── cli/
│ ├── main.py # CLI entry point
│ └── output.py # Colour output, tables, JSON mode
└── gui/
├── app.py # QApplication entry point + stylesheet
├── kernel_model.py # QAbstractTableModel for KernelEntry lists
├── main_window.py # Main window (toolbar, tabs, log panel)
└── widgets/
├── kernel_view.py # Filterable, sortable kernel table
├── log_panel.py # Collapsible live log panel
├── lkf_build_dialog.py # lkf build dialog (Profile + Custom modes)
├── gentoo_compile_dialog.py
└── note_dialog.py
Adding a new kernel source: implement KernelProvider in lkm/core/providers/ and register it in lkm/core/providers/__init__.py.
Adding a new package manager: implement PackageBackend in lkm/core/backends/ and register it in lkm/core/backends/__init__.py and lkm/core/system.py.
Development
git clone https://github.com/Interested-Deving-1896/lkm
cd lkm
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
# Run tests
pytest
# Lint
ruff check lkm/
# Type check
mypy lkm/
# Launch GUI
lkm-gui
# Launch CLI
lkm info
lkm list
Notes on specific providers
Ubuntu Mainline PPA — packages are unsigned and will not boot with Secure Boot enabled. lkm warns at startup if Secure Boot is detected.
XanMod / Liquorix — x86-64 only. On first use, lkm offers to add the required apt repository and signing key automatically.
lkf build — requires lkf on PATH. Set LKF_ROOT to point lkm at a non-standard lkf installation. Build output lands in ~/.cache/lkm/lkf-output/ by default; override with LKF_OUTPUT_DIR.
Gentoo — lkm build (via lkf) prints the interactive make menuconfig command for you to run in a terminal. The GUI Gentoo compile dialog streams the full build output live.
NixOS — kernel selection is declarative. lkm emits the boot.kernelPackages configuration snippet and optionally runs nixos-rebuild switch. It does not edit configuration.nix directly. Run lkm inside a nix-shell (or nix develop) to ensure build tools are on PATH.
License
GPL-3.0-or-later. See LICENSE.
Origins
lkm is a merger of:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file linux_kernel_manager-0.1.2.tar.gz.
File metadata
- Download URL: linux_kernel_manager-0.1.2.tar.gz
- Upload date:
- Size: 71.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b832d66f5385930e925df68f22b20981b4ff0c297105f155b8168e517d09dcb3
|
|
| MD5 |
fd277125811595d2a8109f3ec8388a38
|
|
| BLAKE2b-256 |
d0d6f8491f30012e4e16c0ef1bbde1a6e6b883cadccb7e5331a146453f6e7e73
|
Provenance
The following attestation bundles were made for linux_kernel_manager-0.1.2.tar.gz:
Publisher:
publish.yml on Interested-Deving-1896/lkm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
linux_kernel_manager-0.1.2.tar.gz -
Subject digest:
b832d66f5385930e925df68f22b20981b4ff0c297105f155b8168e517d09dcb3 - Sigstore transparency entry: 1203520835
- Sigstore integration time:
-
Permalink:
Interested-Deving-1896/lkm@fe7cf3c523f48ffb5c274749ef22ee01fa1ab790 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Interested-Deving-1896
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fe7cf3c523f48ffb5c274749ef22ee01fa1ab790 -
Trigger Event:
push
-
Statement type:
File details
Details for the file linux_kernel_manager-0.1.2-py3-none-any.whl.
File metadata
- Download URL: linux_kernel_manager-0.1.2-py3-none-any.whl
- Upload date:
- Size: 70.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9908f69db5e0cef57a1097ebe2a8b3c28964676108254c94395e52e7e5d6eb05
|
|
| MD5 |
f8eb8779c8f2ac04baf2653a879d5b53
|
|
| BLAKE2b-256 |
61c97b0d8fd9e6ceb9fc86ceab25eeab997b7510ba4b830f35f8f24af57e804e
|
Provenance
The following attestation bundles were made for linux_kernel_manager-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on Interested-Deving-1896/lkm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
linux_kernel_manager-0.1.2-py3-none-any.whl -
Subject digest:
9908f69db5e0cef57a1097ebe2a8b3c28964676108254c94395e52e7e5d6eb05 - Sigstore transparency entry: 1203520838
- Sigstore integration time:
-
Permalink:
Interested-Deving-1896/lkm@fe7cf3c523f48ffb5c274749ef22ee01fa1ab790 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Interested-Deving-1896
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fe7cf3c523f48ffb5c274749ef22ee01fa1ab790 -
Trigger Event:
push
-
Statement type: