eselect
Manage alternative versions of configuration files
TLDR
Display a list of installed modules
View documentation for a specific module
Display a help message for a specific module
SYNOPSIS
eselect [global_options] module [module_options] command [command_options] [arguments...]
eselect module list
eselect module set #item_number|item_name
eselect help
PARAMETERS
--help, -h
Displays the global help message and usage information for eselect.
--version, -v
Shows the version of the eselect utility.
--brief, -b
Outputs information in a brief, less verbose format, suitable for scripting.
DESCRIPTION
eselect is a powerful command-line utility used in Gentoo Linux to manage system-wide selections or "alternatives" for various software components. It provides a standardized interface for users to switch between different installed versions or configurations of critical system components like Python interpreters, Java Virtual Machines (JVMs), GCC profiles, kernel symlinks, and more.
Unlike some other Linux distributions that use tools like `update-alternatives`, eselect operates through a modular system. Each eselect module (e.g., eselect python, eselect java) is designed to handle a specific selection type, providing a consistent `list`, `set`, and `show` interface for managing options.
This allows Gentoo users significant flexibility to tailor their environment. For instance, a developer might use eselect python to switch between Python 3.8 and 3.9, or eselect kernel to point to a newly compiled kernel. It is a cornerstone of Gentoo's highly configurable and flexible system design, empowering users to make deliberate choices about their software stack. Most eselect operations affecting global system settings require root privileges.
CAVEATS
eselect is a Gentoo Linux-specific utility and is not found on other distributions. Most operations that modify system-wide settings require root privileges (e.g., using sudo or running as root). Incorrect usage, especially with critical modules like kernel or python, can lead to system instability or render certain applications unusable by breaking expected paths or dependencies. Users should exercise caution and understand the implications of their selections. Furthermore, each eselect module has its own set of commands and behaviors, which need to be understood independently.
MODULES
The core functionality of eselect is provided through its modular architecture. Each module handles a specific type of selection. Common modules include:
python: Manages default Python interpreter (e.g., Python 3.8 vs 3.9).
java: Selects the default Java Virtual Machine (JVM).
kernel: Manages kernel symlinks for the currently booted kernel.
gcc: Switches between different installed GCC versions.
perl: Manages default Perl interpreter.
news: Manages Gentoo News items.
COMMON MODULE COMMANDS
While specific module commands may vary, most eselect modules support a common set of operations:
list: Displays all available options for the selected module, often with their corresponding selection numbers.
set: Sets the active option for the module, usually by providing an item number or name from the list.
show: Shows the currently active option for the module.
status: (Similar to show, provides current status or configuration).
HISTORY
eselect's history is deeply intertwined with that of Gentoo Linux itself. As Gentoo evolved and offered users increasing flexibility in choosing different versions of critical software (like multiple Python interpreters, GCC versions, or Java environments), a centralized tool was needed to manage these alternatives. It was developed to provide a consistent interface for managing these 'slots' of different software versions, aligning with Gentoo's philosophy of 'choices, not policies'. Over time, its modular architecture allowed for easy expansion to manage new types of system selections, becoming an indispensable part of a Gentoo system administrator's toolkit for fine-grained environmental control.
SEE ALSO
emerge(1), env-update(1), dispatch-conf(1), update-alternatives(8) (Debian/Ubuntu similar functionality)