Default crontab editor

Posted on November 26, 2005

I was working on some sysadmin tasks on a freshly installed server, and I found out the crontab editor was not what I expected it to be. I really like vi (or vim) for command line editing, so I wanted ‘crontab -e’ to use vi instead of something else. To make that happen, I put this into my bashrc file (location: ~/.bashrc):

export VISUAL=vi

I keep forgetting this, so I decided to blog it. Don’t forget to reload the bashrc by doing this:

source ~/.bashrc

And vi will be at your service!

Comments

Leave a Comment

If you would like to make a comment, please fill out the form below.

Name (required)

Email (required)

Website

Comments

5 Comments so far
  1. Fahd January 6, 2006 10:57 am

    Thank you, vi has been bugging me for a while. Just changed to nano! :)

  2. Frank Daley January 18, 2006 11:18 am

    Thanks for the tip, although I also much prefer nano as my default editor.

  3. D April 27, 2006 4:06 pm

    Thank you very much! :)
    vim at last
    So much faster to edit stuff :)

  4. Drew Decker December 12, 2006 4:09 am

    Thanks man. One of those things that you think would be easy to edit in a configuration file. I, too, prefer the vi editor, not nano.

    Loved nano for awhile, until I realized the true power of vi :D

  5. benoy February 5, 2007 10:28 pm

    thanks! this helped me also…