The alternatives system manages
which program is executed when you run a specific command. For instance, the ed, nano,
and nvi packages each provide a text editor. An alternative maintained in the system guarantees
that a text editor is accessible through the generic editor command, regardless of which combination
of these packages is installed.
The system administrator can designate which program is referenced in the alternatives database
through the use of the update-alternatives command:
# update-alternatives --config editor
CAUTION
CAUTION
323
Running Debian GNU/Linux 9
These are alternatives that provide 'editor'.
Selection Alternative
-----------------------------------------------
1 /bin/ed
*+ 2 /bin/nano
3 /usr/bin/nvi
Press enter to keep the default[*],
or type selection number: 2
You can also use the --all command with update-alternatives to configure every entry in
the alternatives database, one at a time. You can find more details by typing the following: man
update-alternatives.
By default, all alternatives are in automatic mode, meaning that the system automatically
selects a suitable program from the available candidates. Installing a new candidate
program generally results in the automatic updating of the appropriate alternatives.
Pages:
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665