# update-alternatives --config editor
There are 7 alternatives which provide `editor’.
Selection Alternative
———————————————–
1 /bin/ed
+ 2 /bin/nano
3 /usr/bin/vim.tiny
* 4 /usr/bin/vim.basic
5 /usr/bin/nedit
6 /usr/bin/emacs21
7 /usr/bin/xemacs21
Press enter to keep the default[*], or type selection number: 6
export EDITOR=nano isn’t good enough for you? you have to use sudo and change it for the whole system?