Jun 29, 2015 - Many of the utilities in Ubuntu Linux use a text editor to allow you to edit configuration options and files. An example of this is using the crontab.
You can change $EDITOR systemwide. Just drop a short script into /etc/profile.d/ which does this. The file only needs a single line: export EDITOR=/usr/bin/myeditor Edit: There are two ways (at least:-/) in which a program can find an editor to launch. The traditional Unix/Linux mechanism is to use $EDITOR. In addition to that, Debian (and therefore Ubuntu) has special aliases for various kinds of programs.
![Change Change](/uploads/1/2/5/4/125499031/117286141.jpg)
These are provided by the 'alternatives' system (a system of configurable symlinks). For editors this provides the aliases editor and sensible-editor.
These can be updated using update-alternatives: sudo update-alternatives -config editor (same for sensible-editor). This will prompt you for the editor to use. However, in Debian programs are suppposed to read $EDITOR first: Thus, every program that launches an editor or pager must use the EDITOR or PAGER environment variable to determine the editor or pager the user wishes to use. If these variables are not set, the programs /usr/bin/editor and /usr/bin/pager should be used, respectively. These two files are managed through the dpkg 'alternatives' mechanism. If it is very hard to adapt a program to make use of the EDITOR or PAGER variables, that program may be configured to use /usr/bin/sensible-editor and /usr/bin/sensible-pager as the editor or pager program respectively.
(Debian Policy Manual, ) In one sentence: Setting $EDITOR globally should be enough.