Re: [help-a-newb] Why nano (or was it pico) instead of vi for visudo? (was question about adduser)
On 03/20/2011 10:15 PM, Tom H wrote:
That's interesting. In my distro (PCLOS) I had to modify visudo to add
myself, and I had not
configured any editor. It seems that the _vi_ part of "visudo" means
the vi editor, because that's
how it opened. I had to go and look up the vi commands to save and
exit. Now if I ever need to
do it again, I'll know I can use something more user-friendly. Thanx
for the heads-up.
On Sun, Mar 20, 2011 at 8:30 PM, Joel Rees<firstname.lastname@example.org> wrote:
It's nano and the reason that nano's called by visudo (paradoxically)
is that visudo calls "/usr/bin/editor" and the alternatives system
maps it to "/usr/bin/nano".
You can run visudo with "EDITOR=vi visudo" if you just want vi in this instance.
Or you can run "update-alternatives --config editor" to point
"/usr/bin/editor" to "/usr/bin/vi".
Blessed are the peacemakers...for they shall be shot at from both sides. --A. M. Greeley