How to Change & Set the Default crontab Editor

1
1011

 

Most hardcore command line users and unix geeks love vi, but I prefer nano. If you want to change your default crontab editor to nano, here’s how to do this:

 

For a one time edit, launch the terminal and type:

EDITOR=nano crontab -e

If you want to set nano as your default editor in general, you use this command:

export EDITOR=/usr/bin/nano

Now when you go to edit crontab, nano will be the default editor than vi. You can test this by typing:

crontab -e

Originally posted 2016-02-15 22:20:37.

1 COMMENT

  1. Thank you!
    After several years my crontab was gone –
    needed help to reset that, for yours.
    All three thumbs up 🙂

LEAVE A REPLY

Please enter your comment!
Please enter your name here