| For REDHAT systems past 7.1 add the following lines to your /etc/profile
file. To edit the file type nano -w /etc/profile VISUAL=/usr/bin/nano EDITOR=/usr/bin/nano export VISUAL EDITOR For older systems the technique below should work. From the Newbie's Linux Manual Changing Your Default Editor by Laurence Hunter The Vi Revolt When you create an e-mail in Mutt or edit your crontab file with crontab -e you use the default editor which is Vi. So how do you change this? If you want to change the default editor for every user account, enter the following as root: nano -w /etc/profile (The -w is important because everything on the line that starts with export needs to be on one line.) Or if you only want to change the default editor for your account (overrides system-wide editor), enter: nano ~/.bash_profile Somewhere before the line that begins with export, enter: EDITOR=nano (Or EDITOR=emacs, EDITOR=joe, EDITOR=vi etc.) Add the word EDITOR to the end of the line that begins with export, and press Ctrl+o to save the file, and Ctrl+x to exit. To apply changes enter: . /etc/profile ..or: . ~/.bash_profile |