Change the default editor on Debian.

Debian uses for visudo, crontab, reportbug and other similar applications the default text editor, if you want to change it use the update-alternatives command.

Run this on a CLI.

root# update-alternatives --config editor

The options in my Debian system are:

There are 6 alternatives which provide `editor’.

Selection Alternative
1 /bin/ed
2 /bin/nano
3 /usr/bin/vim.tiny
*+ 4 /usr/bin/vim.gnome
5 /usr/bin/mcedit-debian
6 /usr/bin/emacs21

Press enter to keep the default[*], or type selection number:
The + sign denotes the default option, and the * sign denotes the actual selection, to change from vim to nano, just press 2 in this example and the ENTER.

Leave a Reply

Your email address will not be published. Required fields are marked *