Howto Change Default editor in Debian Etch
Posted by Admin on May 21st, 2007
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
Administrators who wish to change the default editor for all users will have to update the alternatives system using:
# update-alternatives --config editor
Once you enter it opens available editor options from your server you should see similar to the following screen here i have selected option4 for vi editor

If you are an user wishing to change the default editor can define the environment variable EDITOR by introducing the following lines in their own profiles
EDITOR=vi
export EDITOR
alias editor=$EDITOR


August 9th, 2008 at 2:41 pm
The profile advice does not appear to work in either Etch or Ubuntu; I have .bash_profile containing the EDITOR=vim.tiny;export and alias lines as above, I even created a ~/bin/editor symlink! But I still get nano
August 18th, 2008 at 5:48 pm
I had the same problem I put ” export EDITOR= ” in .bashrc