Alternatives command
From NetworkCommands
A command line program available on Linux platforms; used to create, modify, display or delete program alternatives configuration. Alternatives are programs fulfilling the same or similar functions. A configured default alternative is used to perform a specific function or respond to a specific command, rather than other programs that may be able to perform that function or respond.
Note this command is called update-alternatives on Debian based systems (including Xandros) but functionality and syntax are very similar.
This article only deals with fairly basic, end user use of this command.
This gives choice to the users of a system, allowing each to use a different editor, if desired, but makes it difficult for a program to make a good choice of editor to invoke if the user has not specified a particular preference.
alternatives --install /etc/alternatives/editor myeditor /usr/bin/kwrite 90 alternatives --install /etc/alternatives/editor myeditor /usr/bin/gedit 90 alternatives --install /etc/alternatives/editor myeditor /usr/bin/emacs 90
Contents |
Usage Syntax
alternatives [options]
Common options include;
- config application-type/name - modify which application is used or is the default aplication used to perform a specific function or respond to a command
- display application-type/name - display which application is used or is the default aplication used to perform a specific function or respond to a command and list the available alternatives
Usage Examples
alternatives --config x-terminal-emulator - modify the system default terminal emulator package (used, for instance, when [CTRL]+[ALT]+T is pressed on an EeePC.) A list of alternatives is provided and the default can be selected by entering it's corresponding number as displayed in the list.
alternatives --config editor - modify the system default file editing package. A list of alternatives is provided and the default can be selected by entering it's corresponding number as displayed in the list.
alternatives --display java - display the system default java runtime and available alternatives, if any.
alternatives --display mta - display the system default mta, used to send and receive email for the system and available alternatives, if any.
Usage Notes
Linux Usage Notes
With most Linux or Unix commands;
- Brief help can be displayed using the option/keyword: -h or --help, for example: chmod --help
- A full command manual can be displayed using the man command followed by the command name, for example: man chmod
- Sometimes 'info' pages are used instead of or to provide more information than man pages; for example: info chmod
- Version information can be display using the option/keyword: -v or --version, for example: chmod --version
Typical Output
Related Articles
Information on Linux commands
Information on Cisco commands
Information on Vyatta commands
Information on Extreme commands
Information on F5 BigIP commands
Information on Blue Coat SGOS commands
Information on Nokia IPSO commands







