Crontab - how to change the editor

Created 14 years ago by Matt,
Last updated February 27th 2018, 1:51:55 pm

Been playing with crontabs (sort of) and wanted to change the editor of the crontab file, easy! :)

VISUAL="nano" crontab -e

The important part being the VISUAL="nano" ;) which uses the editor nano - which I found to be easier to use than VI


  1. Predominantly and conventionally the EDITOR environment variable is used for this. If you check things like ~/.bashrc, ~/.bash_profile, ~/.profile, ~/.cshrc you will probably find something like EDITOR vi in them. A large number of command line tools will use the EDITOR environment variable to decide what editor to load up. For example on a Mac if you wanted to do everything in say TextMate you could do EDITOR="mate -w" - Geoff on Thu Aug 21 2008 10:17:56 GMT+0000 (Coordinated Universal Time)
  2. Thanks Geffy :) - matt on Thu Aug 21 2008 10:46:09 GMT+0000 (Coordinated Universal Time)