Sometimes you will run a command that requires you to edit some text and save it before the program can continue. Most of the time, such programs will check to see which text editor you have declared to be your preferred one by checking the value of your EDITOR environment variable. The chsh command discussed above is an example of one such program.
To see which editor is currently set as your preferred one, enter the following command at your shell prompt:
> echo $EDITOR
See the section on environment variables for information about how to change your preferred editor.