← 返回命令列表

Linux command

eselect-kernel 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List

eselect kernel list

Set

eselect kernel set [number]

Set

eselect kernel set [linux-6.1.0-gentoo]

Show

eselect kernel show

说明

eselect kernel is a module of the eselect framework that manages the /usr/src/linux symlink on Gentoo systems. This symlink is critical as it determines which kernel source tree is used when building external kernel modules, configuring the kernel, or compiling software that needs kernel headers. When multiple kernel source versions are installed (common during kernel upgrades or testing), this tool provides an easy way to switch between them without manually recreating the symlink. This is particularly important for maintaining external modules like graphics drivers or virtualization software that must be compiled against the correct kernel sources matching the running or target kernel version.

参数

list
List available kernel sources with numbers, asterisk marks current selection
set _target_
Set /usr/src/linux symlink to target (name or number from list)
show
Display the current symlink target

FAQ

What is the eselect-kernel command used for?

eselect kernel is a module of the eselect framework that manages the /usr/src/linux symlink on Gentoo systems. This symlink is critical as it determines which kernel source tree is used when building external kernel modules, configuring the kernel, or compiling software that needs kernel headers. When multiple kernel source versions are installed (common during kernel upgrades or testing), this tool provides an easy way to switch between them without manually recreating the symlink. This is particularly important for maintaining external modules like graphics drivers or virtualization software that must be compiled against the correct kernel sources matching the running or target kernel version.

How do I run a basic eselect-kernel example?

Run `eselect kernel list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does list do in eselect-kernel?

List available kernel sources with numbers, asterisk marks current selection