Hello,
visudo looks at /usr/bin/editor for which editor is to be used. You can change it using:
Code:
update-alternatives --config editor
which will show you a list to choose from like below:
Code:
There are 3 alternatives which provide `editor'.
Selection Alternative
-----------------------------------------------
1 /bin/ed
*+ 2 /bin/nano
3 /usr/bin/vim.tiny
Press enter to keep the default[*], or type selection number:
Take your pick and press enter. Beware that all commands that use the editor will have the new editor opening. For example, crontab also uses the editor reference.
Sorry, forgot to mention: on Ubuntu when not root use sudo.
Kind regards,
Eric