Difference between auto mode and manual mode in update-alternatives

In a nutshell, update-alternatives:

  • in Auto Mode, will select the generic name of the program automatically based on the Priority value of the alternatives; The one with the highest priority gets set as the generic name.

  • in Manual Mode, will set the generic name as the user selected alternative irrespective of the Priority value of the alternatives, hence the name "manual".

Check this:

% sudo update-alternatives --config editor
There are 5 choices for the alternative editor (providing /usr/bin/editor).

  Selection    Path                Priority   Status
------------------------------------------------------------
  0            /bin/nano            40        auto mode
  1            /bin/ed             -100       manual mode
  2            /bin/nano            40        manual mode
* 3            /usr/bin/emacs24     0         manual mode
  4            /usr/bin/vim.basic   30        manual mode
  5            /usr/bin/vim.tiny    10        manual mode

Note that, /bin/nano is both available in auto and manual mode.

If the link group were set in auto mode then the alternative with the highest priority i.e. /bin/nano (priority 40) would be selected as the generic name i.e. /usr/bin/editor. This is the default until the user introduces any change to the link group.

On the other hand, in the manual mode, you can select any alternative as the generic name e.g. in the example, i have /usr/bin/emacs24 set as the generic /usr/bin/editor. You can select any one you like by using the Selection number on the left of the option.

Now I can revert back from the manual mode to auto mode by selecting 0 from the above or by:

sudo update-alternatives --auto editor

In "auto mode", update-alternatives will always select the alternative with the highest priority. If a new or upgraded package is installed which has a higher priority than any other alternative, it will be chosen as the auto alternative.

In "manual mode", update-alternatives will never override the sysadmin's choice, no matter what the relative priorities of the alternatives. The operator has made a choice and the system is going to stick with it until and unless the operator makes a different choice (including choosing to go back to "auto mode").

"auto mode" is the default mode until the operator makes a manual choice.

Each set of alternatives (e.g. editor, awk, vi, pager, etc) has its own individual mode setting...in other words, making a manual choice for editor wont affect the mode of the vi or pager alternatives.