CHANGE THE DEFAULT EDITOR
Quick way to change the default editor for your Linux box
You can change nano with another text editor such as pico, vim
HOW TO MAKE IT PERMANENT?
If you don’t want to type it everytime, the best way to do is add the above export command to your ~/.bashrc file, or even to the /etc/profile file.
with Ubuntu/Debian, there’s a better way
sudo update-alternatives –config editor