I want to change the default editor on my CentOS 7 box for crontab as it currently launches vi and I prefer nano.
I have read a lot of pages online which suggest running export EDITOR='nano'
or some similar - some places seem to suggest double quotes ("
), others no quotes at all.
In any case, none of these approaches are working, I run the export
command, then sudo crontab -e
and still it launches vi! What am I doing wrong?
I realise that if I want the change to persist between sessions, I need to place this export
command into my bashrc
or bash_profile
file, or create a .sh file in /etc/profile.d/
, but I just want to get it working in isolation first before I make it persistent - can anyone help?