This site has been archived and will no longer be updated.
You can find my new profile at neilpahl.com. My new blog is at 808.ninja.
I wanted to change my default text editor in the command line from pico to vi
find out where the binary file for vi is:
which vi >/bin/vi
modify the EDITOR environment variable ** see 'Further Discussion'
export EDITOR=/usr/bin/vi
This adjustment will last for this session only, so add the above to the ~/.bashrc file. The .bashrc file is used to setup the bash shell preferences for the the user.
This worked for Ubuntu. but for other distros (as I found out with my web server), you might have to use the environment variable VISUAL. so, export VISUAL=/usr/bin/vi also, "which vi" can be changed to suite your desired text editor like "which nano"
PLEASE let me know if I'm doing something wrong, or if you have any suggestions or requests~
blog comments powered by Disqus