I am Peter Breuls. I write web applications in PHP, movie reviews and irregularly something on this weblog. Welcome!
Through my company Devize, I'm available as a developer or a consultant for websites or web applications.
I work as an Administrator at online community FOK! and as a Lead Developer at frontoffice supplier SIMgroep.

Default crontab editor

Linux / Tech7 comments

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!

Reacties

D

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

Drew Deckerwebsite

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

Jonathan

Thank you, thank you! I don't hate nano, but it's such an wrench to edit everything in vi, then have to suddenly adapt to using nano just for crontab.

I notice that the first time you run crontab in Ubuntu 9.04 it asks you which editor you want to set as the default (and point to nano as being the "easiest"). So at least some sanity there.

Comment