-rw-r--r-- 1 root root 100 Sep 12 23:09 README lrwxrwxrwx 1 root root 24 Dec 2 08:20 aptitude -> /usr/bin/aptitude-curses* 40 Dec 2 aptitude.8.gz -> /usr/share/man/man8/aptitude-curses.8.gz and other languages 23 Sep 21 arptables -> /usr/sbin/arptables-nft* 31 Sep 21 arptables-restore -> /usr/sbin/arptables-nft-restore* 28 Sep 21 arptables-save -> /usr/sbin/arptables-nft-save* 13 Sep 21 awk -> /usr/bin/mawk* awk.1.gz -> /usr/share/man/man1/mawk.1.gz 38 Sep 21 builtins.7.gz -> /usr/share/man/man7/bash-builtins.7.gz 12 Sep 21 c++ -> /usr/bin/g++* 16 Sep 21 c89 -> /usr/bin/c89-gcc* c89.1.gz -> /usr/share/man/man1/c89-gcc.1.gz 16 Sep 21 c99 -> /usr/bin/c99-gcc* c99.1.gz -> /usr/share/man/man1/c99-gcc.1.gz 12 Sep 21 cc -> /usr/bin/gcc* 12 Sep 21 cpp -> /usr/bin/cpp* 51 Sep 21 cyfmac43455-sdio.bin -> /lib/firmware/cypress/cyfmac43455-sdio-standard.bin 34 Sep 21 default-GM.sf2 -> /usr/share/sounds/sf2/TimGM6mb.sf2 34 Sep 21 default-GM.sf3 -> /usr/share/sounds/sf2/TimGM6mb.sf2 76 Sep 21 desktop-background -> /usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg 67 Sep 21 desktop-background.xml -> /usr/share/desktop-base/active-theme/wallpaper/gnome-background.xml 54 Sep 21 desktop-grub -> /usr/share/desktop-base/active-theme/grub/grub-4x3.png 60 Sep 21 desktop-grub.sh -> /usr/share/desktop-base/active-theme/grub/grub_background.sh 68 Sep 21 desktop-lockscreen.xml -> /usr/share/desktop-base/active-theme/lockscreen/gnome-background.xml 57 Sep 21 desktop-login-background -> /usr/share/desktop-base/active-theme/login/background.svg 46 Sep 21 desktop-plasma5-wallpaper -> /usr/share/desktop-base/active-theme/wallpaper/ 39 Sep 21 desktop-theme -> /usr/share/desktop-base/homeworld-theme/ 17 Sep 21 display -> /usr/bin/gpicview* display.1.gz -> /usr/share/man/man1/gpicview.1.gz 22 Sep 21 ebtables -> /usr/sbin/ebtables-nft* 30 Sep 21 ebtables-restore -> /usr/sbin/ebtables-nft-restore* 27 Sep 21 ebtables-save -> /usr/sbin/ebtables-nft-save* 9 Sep 21 editor -> /bin/nano* editor.1.gz -> /usr/share/man/man1/nano.1.gz 63 Sep 21 emblem-vendor-128 -> /usr/share/icons/desktop-base/128x128/emblems/emblem-debian.png 63 Sep 21 emblem-vendor-256 -> /usr/share/icons/desktop-base/256x256/emblems/emblem-debian.png 61 Sep 21 emblem-vendor-64 -> /usr/share/icons/desktop-base/64x64/emblems/emblem-debian.png 64 Sep 21 emblem-vendor-scalable -> /usr/share/icons/desktop-base/scalable/emblems/emblem-debian.svg 72 Sep 21 emblem-vendor-symbolic-128 -> /usr/share/icons/desktop-base/128x128/emblems/emblem-debian-symbolic.png 72 Sep 21 emblem-vendor-symbolic-256 -> /usr/share/icons/desktop-base/256x256/emblems/emblem-debian-symbolic.png 70 Sep 21 emblem-vendor-symbolic-64 -> /usr/share/icons/desktop-base/64x64/emblems/emblem-debian-symbolic.png 73 Sep 21 emblem-vendor-symbolic-scalable -> /usr/share/icons/desktop-base/scalable/emblems/emblem-debian-symbolic.svg 69 Sep 21 emblem-vendor-white-128 -> /usr/share/icons/desktop-base/128x128/emblems/emblem-debian-white.png 69 Sep 21 emblem-vendor-white-256 -> /usr/share/icons/desktop-base/256x256/emblems/emblem-debian-white.png 67 Sep 21 emblem-vendor-white-64 -> /usr/share/icons/desktop-base/64x64/emblems/emblem-debian-white.png 70 Sep 21 emblem-vendor-white-scalable -> /usr/share/icons/desktop-base/scalable/emblems/emblem-debian-white.svg 17 Dec 6 ex -> /usr/bin/vim.tiny* ex.1.gz -> /usr/share/man/man1/vim.1.gz and other languages 35 Sep 21 faked.1.gz -> /usr/share/man/man1/faked-sysv.1.gz and other languages 22 Sep 21 fakeroot -> /usr/bin/fakeroot-sysv* fakeroot.1.gz -> /usr/share/man/man1/fakeroot-sysv.1.gz pand other languages 25 Sep 21 gnome-www-browser -> /usr/bin/chromium-browser* 50 Sep 21 idmap-plugin -> /usr/lib/arm-linux-gnueabihf/cifs-utils/idmapwb.so idmap-plugin.8.gz -> /usr/share/man/man8/idmapwb.8.gz 23 Sep 21 ip6tables -> /usr/sbin/ip6tables-nft* 31 Sep 21 ip6tables-restore -> /usr/sbin/ip6tables-nft-restore* 28 Sep 21 ip6tables-save -> /usr/sbin/ip6tables-nft-save* 22 Sep 21 iptables -> /usr/sbin/iptables-nft* 30 Sep 21 iptables-restore -> /usr/sbin/iptables-nft-restore* 27 Sep 21 iptables-save -> /usr/sbin/iptables-nft-save* 9 Sep 21 ksh -> /bin/mksh* ksh.1.gz -> /usr/share/man/man1/mksh.1.gz 15 Sep 21 lft -> /usr/bin/lft.db* lft.1.gz -> /usr/share/man/man1/lft.db.1.gz 46 Sep 21 libblas.so.3-arm-linux-gnueabihf -> /usr/lib/arm-linux-gnueabihf/blas/libblas.so.3 50 Sep 21 liblapack.so.3-arm-linux-gnueabihf -> /usr/lib/arm-linux-gnueabihf/lapack/liblapack.so.3 39 Sep 21 lightdm-greeter -> /usr/share/xgreeters/pi-greeter.desktop 16 Sep 21 lua-compiler -> /usr/bin/luac5.1* lua-compiler-manual -> /usr/share/man/man1/luac5.1.1.gz 15 Sep 21 lua-interpreter -> /usr/bin/lua5.1* lua-manual -> /usr/share/man/man1/lua5.1.1.gz 14 Sep 21 lzcat -> /usr/bin/xzcat* lzcat.1.gz -> /usr/share/man/man1/xzcat.1.gz 14 Sep 21 lzcmp -> /usr/bin/xzcmp* lzcmp.1.gz -> /usr/share/man/man1/xzcmp.1.gz 15 Sep 21 lzdiff -> /usr/bin/xzdiff* lzdiff.1.gz -> /usr/share/man/man1/xzdiff.1.gz 16 Sep 21 lzegrep -> /usr/bin/xzegrep* lzegrep.1.gz -> /usr/share/man/man1/xzegrep.1.gz 16 Sep 21 lzfgrep -> /usr/bin/xzfgrep* lzfgrep.1.gz -> /usr/share/man/man1/xzfgrep.1.gz 15 Sep 21 lzgrep -> /usr/bin/xzgrep* lzgrep.1.gz -> /usr/share/man/man1/xzgrep.1.gz 15 Sep 21 lzless -> /usr/bin/xzless* lzless.1.gz -> /usr/share/man/man1/xzless.1.gz 11 Sep 21 lzma -> /usr/bin/xz* lzma.1.gz -> /usr/share/man/man1/xz.1.gz 15 Sep 21 lzmore -> /usr/bin/xzmore* lzmore.1.gz -> /usr/share/man/man1/xzmore.1.gz 11 Sep 21 mt -> /bin/mt-gnu* mt.1.gz -> /usr/share/man/man1/mt-gnu.1.gz 13 Sep 21 nawk -> /usr/bin/mawk* nawk.1.gz -> /usr/share/man/man1/mawk.1.gz 15 Sep 21 nc -> /bin/nc.openbsd* nc.1.gz -> /usr/share/man/man1/nc_openbsd.1.gz 15 Sep 21 netcat -> /bin/nc.openbsd* netcat.1.gz -> /usr/share/man/man1/nc_openbsd.1.gz 17 Sep 21 open -> /usr/bin/xdg-open* open.1.gz -> /usr/share/man/man1/xdg-open.1.gz 13 Sep 21 pager -> /usr/bin/less* pager.1.gz -> /usr/share/man/man1/less.1.gz 9 Sep 21 pico -> /bin/nano* pico.1.gz -> /usr/share/man/man1/nano.1.gz 24 Sep 21 pinentry -> /usr/bin/pinentry-gnome3* 24 Sep 21 pinentry-x11 -> /usr/bin/pinentry-gnome3* pinentry-x11.1.gz -> /usr/share/man/man1/pinentry-gnome3.1.gz 40 Sep 21 pinentry.1.gz -> /usr/share/man/man1/pinentry-gnome3.1.gz 12 Sep 21 rcp -> /usr/bin/scp* rcp.1.gz -> /usr/share/man/man1/scp.1.gz 34 Sep 21 regulatory.db -> /lib/firmware/regulatory.db-debian 38 Sep 21 regulatory.db.p7s -> /lib/firmware/regulatory.db.p7s-debian 9 Sep 21 rksh -> /bin/mksh* rksh.1.gz -> /usr/share/man/man1/mksh.1.gz 15 Sep 21 rlogin -> /usr/bin/slogin* rlogin.1.gz -> /usr/share/man/man1/slogin.1.gz 17 Sep 21 rmt -> /usr/sbin/rmt-tar* rmt.8.gz -> /usr/share/man/man8/rmt-tar.8.gz 12 Sep 21 rsh -> /usr/bin/ssh* rsh.1.gz -> /usr/share/man/man1/ssh.1.gz 49 Sep 21 rst-buildhtml -> /usr/share/docutils/scripts/python3/rst-buildhtml* 44 Sep 21 rst2html -> /usr/share/docutils/scripts/python3/rst2html* 45 Sep 21 rst2html4 -> /usr/share/docutils/scripts/python3/rst2html4* 45 Sep 21 rst2html5 -> /usr/share/docutils/scripts/python3/rst2html5* 45 Sep 21 rst2latex -> /usr/share/docutils/scripts/python3/rst2latex* 43 Sep 21 rst2man -> /usr/share/docutils/scripts/python3/rst2man* 43 Sep 21 rst2odt -> /usr/share/docutils/scripts/python3/rst2odt* 54 Sep 21 rst2odt_prepstyles -> /usr/share/docutils/scripts/python3/rst2odt_prepstyles* 49 Sep 21 rst2pseudoxml -> /usr/share/docutils/scripts/python3/rst2pseudoxml* 42 Sep 21 rst2s5 -> /usr/share/docutils/scripts/python3/rst2s5* 45 Sep 21 rst2xetex -> /usr/share/docutils/scripts/python3/rst2xetex* 43 Sep 21 rst2xml -> /usr/share/docutils/scripts/python3/rst2xml* 47 Sep 21 rstpep2html -> /usr/share/docutils/scripts/python3/rstpep2html* 17 Dec 6 rview -> /usr/bin/vim.tiny* 52 Sep 21 start-here-16.png -> /usr/share/icons/gnome/16x16/places/debian-swirl.png 52 Sep 21 start-here-22.png -> /usr/share/icons/gnome/22x22/places/debian-swirl.png 52 Sep 21 start-here-24.png -> /usr/share/icons/gnome/24x24/places/debian-swirl.png 54 Sep 21 start-here-256.png -> /usr/share/icons/gnome/256x256/places/debian-swirl.png 52 Sep 21 start-here-32.png -> /usr/share/icons/gnome/32x32/places/debian-swirl.png 52 Sep 21 start-here-48.png -> /usr/share/icons/gnome/48x48/places/debian-swirl.png 55 Sep 21 start-here.svg -> /usr/share/icons/gnome/scalable/places/debian-swirl.svg 26 Sep 21 tcptraceroute -> /usr/sbin/tcptraceroute.db* tcptraceroute.8.gz -> /usr/share/man/man8/tcptraceroute.db.8.gz 22 Sep 21 traceproto -> /usr/bin/traceproto.db* traceproto.1.gz -> /usr/share/man/man1/traceproto.db.1.gz 22 Sep 21 traceroute -> /usr/bin/traceroute.db* traceroute.1.gz -> /usr/share/man/man1/traceroute.db.1.gz 22 Sep 21 traceroute.sbin -> /usr/bin/traceroute.db* traceroute6 -> /usr/bin/traceroute6.db* 39 Sep 21 traceroute6.1.gz -> /usr/share/man/man1/traceroute6.db.1.gz 13 Sep 21 unlzma -> /usr/bin/unxz* unlzma.1.gz -> /usr/share/man/man1/unxz.1.gz 36 Sep 21 vendor-logos -> /usr/share/desktop-base/debian-logos/ 17 Dec 6 vi -> /usr/bin/vim.tiny* vi.1.gz -> /usr/share/man/man1/vim.1.gz and other languages 17 Dec 6 view -> /usr/bin/vim.tiny* view.1.gz -> /usr/share/man/man1/vim.1.gz and other languages 17 Sep 21 write -> /usr/bin/write.ul* write.1.gz -> /usr/share/man/man1/write.ul.1.gz 37 Sep 21 x-cursor-theme -> /usr/share/icons/Adwaita/cursor.theme 21 Sep 21 x-session-manager -> /usr/bin/startlxde-pi* 34 Sep 21 x-session-manager.1.gz -> /usr/share/man/man1/startlxde.1.gz 19 Sep 21 x-terminal-emulator -> /usr/bin/lxterminal* x-terminal-emulator.1.gz -> /usr/share/man/man1/lxterminal.1.gz 16 Sep 21 x-window-manager -> /usr/bin/openbox* x-window-manager.1.gz -> /usr/share/man/man1/openbox.1.gz 25 Sep 21 x-www-browser -> /usr/bin/chromium-browser* drwxrwxr-x 2 root staff 12288 Dec 6 ./update-alternatives(1) dpkg suite update-alternatives - maintain symbolic links determining default commands
update-alternatives [option...] commandCreates, removes, maintains and displays information about the symbolic links comprising the Debian alternatives system.
It is possible for several programs fulfilling the same or similar functions to be installed on a single system at the same time. For example, many systems have several text editors installed at once. 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 for an editor to invoke if the user has not specified a particular preference.
Debian's alternatives system aims to solve this problem. A generic name in the filesystem is shared by all files providing interchangeable functionality. The alternatives system and the system administrator together determine which actual file is referenced by this generic name. For example, if the text editors ed(1) and nvi(1) are both installed on the system, the alternatives system will cause the generic name /usr/bin/editor to refer to /usr/bin/nvi by default. The system administrator can override this and cause it to refer to /usr/bin/ed instead, and the alternatives system will not alter this setting until explicitly requested to do so.
The generic name is not a direct symbolic link to the selected alternative. Instead, it is a symbolic link to a name in the alternatives directory, which in turn is a symbolic link to the actual file referenced. This is done so that the system administrator's changes can be confined within the /etc directory: the FHS (q.v.) gives reasons why this is a Good Thing.
When each package providing a file with a particular functionality is installed, changed or removed, update-alternatives is called to update information about that file in the alternatives system. update-alternatives is usually called from the following Debian package maintainer scripts, postinst (configure) to install the alternative and from prerm and postrm (remove) to remove the alternative. Note: in most (if not all) cases no other maintainer script actions should call update-alternatives, in particular neither of upgrade nor disappear, as any other such action can lose the manual state of an alternative, or make the alternative temporarily flip-flop, or completely switch when several of them have the same priority.
It is often useful for a number of alternatives to be synchronized, so that they are changed as a group; for example, when several versions of the vi(1) editor are installed, the man page referenced by /usr/share/man/man1/vi.1 should correspond to the executable referenced by /usr/bin/vi. update-alternatives handles this by means of master and slave links; when the master is changed, any associated slaves are changed too. A master link and its associated slaves make up a link group.
Each link group is, at any given time, in one of two modes: automatic or manual. When a group is in automatic mode, the alternatives system will automatically decide, as packages are installed and removed, whether and how to update the links. In manual mode, the alternatives system will retain the choice of the administrator and avoid changing the links (except when something is broken).
Link groups are in automatic mode when they are first introduced to the system. If the system administrator makes changes to the system's automatic settings, this will be noticed the next time update-alternatives is run on the changed link's group, and the group will automatically be switched to manual mode.
Each alternative has a priority associated with it. When a link group is in automatic mode, the alternatives pointed to by members of the group will be those which have the highest priority.
When using the --config option, update-alternatives will list all of the choices for the link group of which given name is the master alternative name. The current choice is marked with a '*'. You will then be prompted for your choice regarding this link group. Depending on the choice made, the link group might no longer be in auto mode. You will need to use the --auto option in order to return to the automatic mode (or you can rerun --config and select the entry marked as automatic).
If you want to configure non-interactively you can use the --set option instead (see below).
Different packages providing the same file need to do so cooperatively. In other words, the usage of update-alternatives is mandatory for all involved packages in such case. It is not possible to override some file in a package that does not employ the update-alternatives mechanism.
TERMINOLOGY Since the activities of update-alternatives are quite involved, some specific terms will help to explain its operation.
generic name (or alternative link) A name, like /usr/bin/editor, which refers, via the alternatives system, to one of a number of files of similar function.
alternative name The name of a symbolic link in the alternatives directory.
alternative (or alternative path) The name of a specific file in the filesystem, which may be made accessible via a generic name using the alternatives system.
alternatives directory A directory, by default /etc/alternatives, containing the symlinks.
administrative directory A directory, by default /var/lib/dpkg/alternatives, containing update-alternatives' state information.
link group A set of related symlinks, intended to be updated as a group.
master link The alternative link in a link group which determines how the other links in the group are configured.
slave link An alternative link in a link group which is controlled by the setting of the master link.
automatic mode When a link group is in automatic mode, the alternatives system ensures that the links in the group point to the highest priority alternative appropriate for the group.
manual mode When a link group is in manual mode, the alternatives system will not make any changes to the system administrator's settings.
COMMANDS --install link name path priority [--slave link name path]... Add a group of alternatives to the system. link is the generic name for the master link, name is the name of its symlink in the alternatives directory, and path is the alternative being introduced for the master link. The arguments after --slave are the generic name, symlink name in the alternatives directory and the alternative path for a slave link. Zero or more --slave options, each followed by three arguments, may be specified. Note that the master alternative must exist or the call will fail. However if a slave alternative doesn't exist, the corresponding slave alternative link will simply not be installed (a warning will still be displayed). If some real file is installed where an alternative link has to be installed, it is kept unless --force is used.
If the alternative name specified exists already in the alternatives system's records, the information supplied will be added as a new set of alternatives for the group. Otherwise, a new group, set to automatic mode, will be added with this information. If the group is in automatic mode, and the newly added alternatives' priority is higher than any other installed alternatives for this group, the symlinks will be updated to point to the newly added alternatives.
--set name path Set the program path as alternative for name. This is equivalent to --config but is non-interactive and thus scriptable.
--remove name path Remove an alternative and all of its associated slave links. name is a name in the alternatives directory, and path is an absolute filename to which name could be linked. If name is indeed linked to path, name will be updated to point to another appropriate alternative (and the group is put back in automatic mode), or removed if there is no such alternative left. Associated slave links will be updated or removed, correspondingly. If the link is not currently pointing to path, no links are changed; only the information about the alternative is removed.
--remove-all name Remove all alternatives and all of their associated slave links. name is a name in the alternatives directory.
--all Call --config on all alternatives. It can be usefully combined with --skip-auto to review and configure all alternatives which are not configured in automatic mode. Broken alternatives are also displayed. Thus a simple way to fix all broken alternatives is to call yes '' | update-alternatives --force --all.
--auto name Switch the link group behind the alternative for name to automatic mode. In the process, the master symlink and its slaves are updated to point to the highest priority installed alternatives.
--display name Display information about the link group. Information displayed includes the group's mode (auto or manual), the master and slave links, which alternative the master link currently points to, what other alternatives are available (and their corresponding slave alternatives), and the highest priority alternative currently installed.
--get-selections List all master alternative names (those controlling a link group) and their status (since version 1.15.0). Each line contains up to 3 fields (separated by one or more spaces). The first field is the alternative name, the second one is the status (either auto or manual), and the last one contains the current choice in the alternative (beware: it's a filename and thus might contain spaces).
--set-selections Read configuration of alternatives on standard input in the format generated by --get-selections and reconfigure them accordingly (since version 1.15.0).
--query name Display information about the link group like --display does, but in a machine parseable way (since version 1.15.0, see section QUERY FORMAT below).
--list name Display all targets of the link group.
--config name Show available alternatives for a link group and allow the user to interactively select which one to use. The link group is updated.
--help Show the usage message and exit.
--version Show the version and exit.
OPTIONS --altdir directory Specifies the alternatives directory, when this is to be different from the default. Defaults to <>.
--admindir directory Specifies the administrative directory, when this is to be different from the default. Defaults to <>
--instdir directory Specifies the installation directory where alternatives links will be created (since version 1.20.1). Defaults to <<>>.
--root directory Specifies the root directory (since version 1.20.1). This also sets the alternatives, installation and administrative directories to match. Defaults to <<>>.
--log file Specifies the log file (since version 1.15.0), when this is to be different from the default (/var/log/alternatives.log).
--force Allow replacing or dropping any real file that is installed where an alternative link has to be installed or removed.
--skip-auto Skip configuration prompt for alternatives which are properly configured in automatic mode. This option is only relevant with --config or --all.
--quiet Do not generate any comments unless errors occur.
--verbose Generate more comments about what is being done.
--debug Generate even more comments, helpful for debugging, about what is being done (since version 1.19.3).
EXIT STATUS 0 The requested action was successfully performed.
2 Problems were encountered whilst parsing the command line or performing the action.
ENVIRONMENT DPKG_ADMINDIR If set and the --admindir option has not been specified, it will be used as the base administrative directory.
FILES /etc/alternatives/ The default alternatives directory. Can be overridden by the --altdir option.
/var/lib/dpkg/alternatives/ The default administration directory. Can be overridden by the --admindir option.
QUERY FORMAT The --query format is using an RFC822-like flat format. It's made of n + 1 blocks where n is the number of alternatives available in the queried link group. The first block contains the following fields:
Name: name The alternative name in the alternative directory.
Link: link The generic name of the alternative.
Slaves: list-of-slaves When this field is present, the next lines hold all slave links associated to the master link of the alternative. There is one slave per line. Each line contains one space, the generic name of the slave alternative, another space, and the path to the slave link.
Status: status The status of the alternative (auto or manual).
Best: best-choice The path of the best alternative for this link group. Not present if there is no alternatives available.
Value: currently-selected-alternative The path of the currently selected alternative. It can also take the magic value none. It is used if the link doesn't exist.
The other blocks describe the available alternatives in the queried link group:
Alternative: path-of-this-alternative Path to this block's alternative.
Priority: priority-value Value of the priority of this alternative.
Slaves: list-of-slaves When this field is present, the next lines hold all slave alternatives associated to the master link of the alternative. There is one slave per line. Each line contains one space, the generic name of the slave alternative, another space, and the path to the slave alternative.
Example $ update-alternatives --query editor Name: editor Link: /usr/bin/editor Slaves: editor.1.gz /usr/share/man/man1/editor.1.gz editor.fr.1.gz /usr/share/man/fr/man1/editor.1.gz editor.it.1.gz /usr/share/man/it/man1/editor.1.gz editor.pl.1.gz /usr/share/man/pl/man1/editor.1.gz editor.ru.1.gz /usr/share/man/ru/man1/editor.1.gz Status: auto Best: /usr/bin/vim.basic Value: /usr/bin/vim.basic
Alternative: /bin/ed Priority: -100 Slaves: editor.1.gz /usr/share/man/man1/ed.1.gz
Alternative: /usr/bin/vim.basic Priority: 50 Slaves: editor.1.gz /usr/share/man/man1/vim.1.gz editor.fr.1.gz /usr/share/man/fr/man1/vim.1.gz editor.it.1.gz /usr/share/man/it/man1/vim.1.gz editor.pl.1.gz /usr/share/man/pl/man1/vim.1.gz editor.ru.1.gz /usr/share/man/ru/man1/vim.1.gz
DIAGNOSTICS With --verbose update-alternatives chatters incessantly about its activities on its standard output channel. If problems occur, update-alternatives outputs error messages on its standard error channel and returns an exit status of 2. These diagnostics should be self-explanatory; if you do not find them so, please report this as a bug.
EXAMPLES There are several packages which provide a text editor compatible with vi, for example nvi and vim. Which one is used is controlled by the link group vi, which includes links for the program itself and the associated manpage.
To display the available packages which provide vi and the current setting for it, use the --display action:
update-alternatives --display vi
To choose a particular vi implementation, use this command as root and then select a number from the list:
update-alternatives --config vi
To go back to having the vi implementation chosen automatically, do this as root:
update-alternatives --auto vi
SEE ALSO ln(1), FHS (the Filesystem Hierarchy Standard).