root password?

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


On Sun, 3 Feb 2008 01:15:06 -0800 (PST)
"Binish A.R" <arbinish at yahoo.com> 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

Peter
-- 
"INX Is Not X" Live CD based on Ubuntu 7.04 : http://inx.maincontent.net
Screenshots slideshow: http://inx.maincontent.net/album/1.png.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080203/2c5a9891/attachment.sig>


More information about the ubuntu-users mailing list