I wonder how to edit crontab with nano editor for super user via sudo. I used the following command but it didn't work. crontab was open but it was not a nano editor.
export EDITOR=nano
sudo crontab -e
Try with sudo -E crontab -e to preserve the environment variable EDITOR you are setting in your own session.
sudo EDITOR=nano crontab -e. – joan Aug 10 '17 at 10:07