How do I find and set my $EDITOR environment variable?
You can set the
$EDITOR variable with this command:
This will define the variable
EDITOR for the current session and pass it into the environment of all its child processes. To set it permanently you must define it in one of the system configuration files. The highest level at which you can do this is to set it in
/etc/environment. This defines it globally:
Check that variable is defined:
$ echo $EDITOR /usr/bin/nano
Editor's note: it's often preferable to put environment variables in your own
~/.profile, which is a lot easier to fix if something goes wrong.
~/.bashrcas in following picture. Do not put quotes around
and then run
source ~/.profile source ~/.bashrc
at the prompt after modifying
.bashrcfor the modification to take effect.
ipython will open
~/.bashrc will be called for
interactive + non-loginshell
~/.profile will be called for
interactive + login shell
In your case it is enough to just add it in
~/.bashrc instead of