Problem: I don’t know where my root users crontab file is, and this doesn’t usually matter because using the command ‘crontab -e’ opens it for editing anyway… but it opens in VI and I am too stupid / lazy / in a rush to use VI.
[Edit – mid 2018: Earlier this year I went through about 3 weeks of IDE/Editor hell and taught myself Vim. It’s… wonderful]
Solution: The -e switch makes the file open in whatever the default editor for the environment is. To override this, pass the EDITOR environment var to the command when it’s run:
sudo env EDITOR=nano crontab -e
Please let me know if this nano tip was useful, just one click!
Leave a Reply