Set default editor to nano

Today I moved my raspbx install to a virtual machine on my nas, which seems to work perfectly. Making the final adjustments I logged into ssh and setup a couple of cronjobs. I love using nano so I would love to set this as the default editor. I used the following commands but on logging in again, the default editor is again set to vi:

export VISUAL=nano
export EDITOR=nano

Can someone tell me how to change it to nano permanently?

1 Like

Found it!

echo export EDITOR=“nano” >> /etc/profile