root password?

Peter Garrett peter.garrett at
Sun Feb 3 09:38:49 UTC 2008

On Sun, 3 Feb 2008 01:15:06 -0800 (PST)
"Binish A.R" <arbinish at> wrote:

> The choice of editor depends on the env variable EDITOR.
> Set the env variable to say vi, export EDITOR=vi
> and visudo would open the file in vi instead of nano ;)

Actually, in Debian and Ubuntu the editor is set by the alternatives
system. "visudo" will use the alternative set for "editor". You can change
it using the command

sudo update-alternatives --config editor

The EDITOR and VISUAL environment variables are not set by default. You can
confirm this by typing

echo $EDITOR
echo $VISUAL

Having said that, it certainly will also work to do,for example

export EDITOR=vi ; visudo

( or indeed export VISUAL=vi )

By default, if you type "editor" you will get whatever is set by the
alternatives system - normally nano, unless for example you have installed
"mc", in  which case you get "mcedit" unless you change it with
update-alternatives. All this depends on the priority set - see

sudo update-alternatives -display editor

"INX Is Not X" Live CD based on Ubuntu 7.04 :
Screenshots slideshow:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the ubuntu-users mailing list