User Tools

Site Tools


linux:change_crontab_editor

Change the default editor for crontab

10.11.2009

If you want to jump from 'vi' used when you edit crontab file (crontab -e), just set VISUAL variable to your editor of choice.
For example, to switch from vi to joe, you should do:

# whereis joe
joe: /usr/bin/joe /etc/joe /usr/X11R6/bin/joe /usr/bin/X11/joe /usr/X11/bin/joe /usr/man/man1/joe.1.gz /usr/share/man/man1/joe.1.gz /usr/X11/man/man1/joe.1.gz
# export VISUAL=/usr/bin/joe

First command is optional of course if you already know where the joe editor is. To make the changes permanent, put in the export line in .bash_profile (assuming you're using bash) in user home folder (our case, root).

linux/change_crontab_editor.txt · Last modified: 2013/03/16 17:40 (external edit)