How would one add a cron job using a noob friendly editor like nano
?
After sudo crontab -e
it loads into vim/vi. I’m embarassed to admit it, but have no idea how to work it! lol
How would one add a cron job using a noob friendly editor like nano
?
After sudo crontab -e
it loads into vim/vi. I’m embarassed to admit it, but have no idea how to work it! lol
I’m pretty sure you just need to set an environment variable, a quick google suggested 2 possible candidates.
export EDITOR=nano
export VISUAL=nano
sudo crontab -e
Alternatively can be added to the sudo command:
sudo EDITOR=nano crontab -e
or
sudo VISUAL=nano crontab -e
That works perfectly. Didn’t realize it’s a general Linux thing vs CL. Thanks
Btw., this is the same way to change the editor using e.g. visudo
, which (as the name says it) loads by default vi
.