Make crontab -e Open Your Editor, Not vi
crontab -e opens whatever the EDITOR (or VISUAL) environment variable points to, and falls back to the system default — usually vi — when neither is set. To use nano or another editor, set EDITOR before running crontab -e, make it permanent in your shell profile, or run select-editor on Debian/Ubuntu.
Change it for one session
EDITOR=nano crontab -e
Make it permanent
Add to ~/.bashrc (or ~/.zshrc): export EDITOR=nano, then source ~/.bashrc.
Debian / Ubuntu shortcut
Run select-editor and pick from the menu; it writes your choice to ~/.selected_editor, which crontab honours.
Stuck inside vi right now?
Press Esc, then type :wq and Enter to save and quit, or :q! to quit without saving.
FAQ
How do I change the editor crontab -e uses?
Set the EDITOR variable: run EDITOR=nano crontab -e for one session, or add export EDITOR=nano to ~/.bashrc to make it permanent.
crontab -e opened vi and I'm stuck. How do I exit?
Press Esc, then type :wq and Enter to save and quit, or :q! to quit without saving.
Is there a menu to pick the editor on Ubuntu?
Yes. Run select-editor to choose from a list; it saves your pick to ~/.selected_editor, which crontab reads.