PrintLogo

Changing the Default Crontab Editor




The default crontab editor is nano on some systems. This is a pain. You can change this by setting the EDITOR environment variable. In BASH:

srv-4 / # set | grep EDITOR
EDITOR=/bin/nano
srv-4 / # which vi
/usr/bin/vi
srv-4 / # export EDITOR=/usr/bin/vi
srv-4 / # set | grep EDITOR
EDITOR=/usr/bin/vi
_=EDITOR
srv-4 / # 

To make the change stick, you can add it to the profile script appropriate for your shell. We put it in /etc/profile.



This article comes from NetAdminTools:
http://www.netadmintools.com/

The URL for this story is:
http://www.netadmintools.com/art395.html

Copyright 1997-2008 NetAdminTools.com. Read our Terms of Use.