eselect

From Gentoo Wiki
Jump to:navigation Jump to:search
Other languages:

eselect is a tool for administration and configuration on Gentoo systems. It will modify the system's behavior and should be used with care by the system administrator. eselect is a modular framework for writing configuration utilities, consisting of:

  • a main program named eselect (found in app-admin/eselect)
  • various modules (*.eselect files) which carry out different tasks
  • several libraries which help to ensure consistent behavior and simplify the creation of new modules


A module provides several actions. Actions typically either display some information (list and show actions are common) or update the system somehow (for example, set and update). Each module also provides help and usage actions which explain how to use the module.

To list all currently installed modules, run eselect without any arguments. See also the eselect user guide.

Installation

Deployments of Gentoo Linux should already have eselect installed, as the app-admin/eselect package is part of the system set.

USE flags

USE flags for app-admin/eselect Gentoo's multi-purpose configuration and management tool

doc Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
emacs Add support for GNU Emacs
vim-syntax Pulls in related vim syntax scripts

Emerge

After USE flag changes

After changing USE flags just for the eselect package, rebuild eselect for the new flags to be applied. As eselect is in the system set, --oneshot should be used to avoid adding it to the world file:

root #emerge --ask --changed-use --oneshot app-admin/eselect

After changing any global USE flags in make.conf that affect the eselect package, emerge world to update to the new USE flags:

root #emerge --ask --verbose --update --deep --newuse @world

Modules

Install an eselect module just like any other package. For example, for the app-eselect/eselect-repository module:

root #emerge --ask --verbose app-eselect/eselect-repository

Some modules will be pulled in when installing packages that depend on them.

See the modules section for information on finding optional modules for installation.

Invocation

Just running eselect, or eselect help for a little more information, will provide usage information and list all installed modules and their function:

root #eselect help

Modules

Gentoo has tens of eselect modules available, to automate various system configuration tasks. Several modules allow to select between optional subsytems, such as which installed vi editor package to use or which emacs distribution to be default.

Some modules are shipped by default with eselect, while other modules can be installed from the Gentoo repository.

To list all modules currently installed, run eselect without any arguments.

Default modules

These modules are maintained as part of the eselect project, so they should be available as long as the app-admin/eselect package is installed.

Arptables, iptables, and ebtables

Manage the iptables/arptables/ebtables symlinks. Because sys-apps/iproute2 is part of the system set, app-eselect/eselect-iptables is often pulled in by the dependency graph, to provide these modules.

user $eselect arptables help

Binutils

Manage installed versions of sys-devel/binutils. This module is not provided as part of the app-admin/eselect package, but is from sys-devel/binutils-config, a dependency of sys-devel/binutils. As sys-devel/binutils is part of the system set, eselect binutils should be available on all Gentoo systems.

user $eselect binutils help

Editor

Manage the EDITOR environment variable, this determines what many CLI programs will run to edit text files.

See also the visual module section.

user $eselect editor help

Env

Manage environment variables set in /etc/env.d.

user $eselect env help

Gcc

Manage installed versions of sys-devel/gcc. Because sys-devel/gcc is part of the system set, sys-devel/gcc-config will be pulled in, providing this module.

user $eselect gcc help

See also upgrading GCC.

Kernel

The /usr/src/linux symlink should point to the currently running kernel, this can be done with eselect.

user $eselect kernel help

See setting the kernel link with eselect.

Locale

Manage the LANG environment variable, this sets the system language for users, date formats etc.

user $eselect locale help

See the handbook, localization guide and UTF-8 article.

Modules

Query eselect modules.

user $eselect modules help

News

Read Gentoo ("GLEP 42") news items. It is important to read and follow these, when they are shown after a Gentoo ebuild repository synchronization.

user $eselect news help

Pager

Manage the PAGER environment variable, this will influence what programs will use to display pages of text to the user.

user $eselect pager help

Profile

Manage the make.profile symlink, this is an important configuration item for Portage, and for the whole system.

user $eselect profile help

See handbook, and the article about profiles.

Rc

Manage OpenRC scripts.

user $eselect rc help

Visual

Manage the VISUAL environment variable, to set the default text editor for capable terminals.

See also the editor module section.

user $eselect visual help
See also
See the text editor article.

Additional modules

Here are some of the modules that can be installed from the Gentoo repository, and are documented in the wiki:

See also