Change the default crontab editor

Posted on Wednesday February 09, 2011 / by Eric Potvin

Some Linux Based OS does not comes with your favorites editor. And maybe in some case the default editor is not the one you are used to. For example, you need to update the crontab:

crontab -e

pico or nano, (for example) opens up. I personally have a preference for VI and I wanted to change it to the editor I am used to. To update the default editor you simply need to execute:

export VISUAL='vi'

Now when you run:

crontab -e

VI will open up. enjoy!