eselect User Guide

Ciaran McCreesh  Author
Danny van Dyk  Author
Ulrich Müller  Author
Shyam Mani  Editor

Updated September 19, 2009

1.  Introduction

A Brief Overview

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

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.

Note: Some modules install symlinks to the main program. eselect handles these intelligently. For example, it realises that profile-config list should be treated as if the user had run eselect profile list.

Advantages for end users and System Administrators

For system administrators and end users, tools written as eselect modules offer several advantages over the traditional "write each tool from scratch" approach:

Advantages for Developers and Package Maintainers

Writing your tool as an eselect module rather than starting from scratch gives you various benefits:

2.  Using eselect

Usage

eselect should be called as shown below.

Code Listing 2.1: eselect – General Syntax

# eselect [<global options>] <module> <action> <options>

eselect features consistently name actions amongst most of its modules. eselect list-modules will show a list of available modules. There is only one global option as of now; --no-color, which asks eselect to stop showing colored output, which is the default. The following are the standard action names – each module may provide a subset of these actions:

A typical session will look like the following for most modules:

Code Listing 2.2: Example eselect session

(Find out options for a module)
# eselect <module> list
These selections are available:
	[1]<first>
	[2]<second>
(Set an option)
# eselect <module> set <first>
(Display the current config)
# eselect <module> show
Active Selection:
	<item1>

You can usually set items either by name or number.