Dec 20
Many editor on Ubuntu such as vim, ed, nano. But default editor is nano. I need to change to vim or anything else. The easiest way is use update-alternatives, which can config anything in /etc/alternatives/. Then can change default editor with
sudo update-alternatives --config editor
Here’s example when you run this command
There are 3 alternatives which provide `editor’.
Selection Alternative
———————————————–
*+ 1 /bin/nano
2 /bin/ed
3 /usr/bin/vimPress enter to keep the default[*], or type selection number: 3
You can select with type number and then enter to change it.


