cat <<EOF >>~/.bash_profile
export VISUAL="nano"
export EDITOR="nano"
EOFDone! Exit then login again or run
source ~/.bash_profile-
Go to current user home directory
~ -
Create file
.bash_profileor open it, if it's already there -
Add lines
export VISUAL="nano" export EDITOR="nano"
-
Done! Exit then login again or run
source ~/.bash_profile
Instead of exiting and logging in again, you can run
source ~/.bashrc.