Log in Go to the main page Page Discussion History Go to the file list Go to the site toolbox Bookmark and Share

Alternatives command

From RZWiki


Image:Tux_64x64.png

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

Image:Vm-power-on-medium.png 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

Image:Vm-power-on-medium.png 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.

Image:accessories-text-editor-v2-medium.png Usage Notes

Image:accessories-text-editor-v2-medium.png Linux Usage Notes

With most Linux or Unix commands;

  • Non root users may need to prefix commands with the sudo command, for example: sudo chmod 644 *
  • Brief help can be displayed using the -h or --help parameter, 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 normally be display using the -v, -V or --version parameter, for example: chmod --version. However, this paramater is also frequently used to display verbose output.

noinclude/noinclude

Image:utilities-terminal-medium-v2.png Typical Output

noinclude/noinclude

Image:icemon-medium.png Related Articles

Information on Linux commands Image:Tux-small.png

Information on Cisco commands Image:Cisco-logo-small.png

Information on Vyatta commands Image:Vyatta-logo-small.png

Information on Extreme commands Image:Extreme-logo-small.png

Information on F5 BigIP commands Image:F5-logo-small.png

Information on Blue Coat SGOS commands

Information on Nokia IPSO commands


Image:internet-group-chat-small.png We really do appreciate all feedback so please do send your comments, suggestions or corrections to sjiveson#routerzone.eu
(replacing the # with an @)


Site Toolbox:

Personal tools
This page was last modified on 10 August 2008, at 13:07. - This page has been accessed 50 times. - Disclaimers - About RZWiki
Powered by MediaWiki