Set default editor on Debian

To change the default editor at the system level:

sudo update-alternatives --config editor

and then follow the onscreen prompts.

If your editor isn’t on the list, do this first:

update-alternatives --install /usr/bin/editor editor /usr/bin/vim 10

admin has written 90 articles