Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

how to change the default editor for crontab

Discussion in 'General Discussion' started by colet, Jun 15, 2006.

  1. colet

    colet Member

    Joined:
    Apr 26, 2006
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    151
    Hello,

    When I run crontab -e I get pico not found. I'd actually like to use vim. My shell is bash, so I added EDITOR=vim; export EDITOR to ~/.bashrc. Now when I login, $EDITOR contains vim, but crontab is still looking for pico.

    Any idea what I've missed?

    Thanks for any help.

    --
    Cole
     
  2. thehostinghut

    thehostinghut Well-Known Member

    Joined:
    Jan 5, 2005
    Messages:
    232
    Likes Received:
    0
    Trophy Points:
    166
    I think the editor that you have is nano

    You can fix this buy doing this:

    cd /usr/bin
    ln -s nano pico
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. colet

    colet Member

    Joined:
    Apr 26, 2006
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    151
    Hi,

    Thanks for the tip. Would the same technique allow me to use vim instead of pico?

    --
    Cole
     
  4. colet

    colet Member

    Joined:
    Apr 26, 2006
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    151
    solved

    Hello,

    Appearently crontab uses $VISUAL environment variable. So I added the following to my ~/.bashrc:
    export EDITOR="vim"
    export VISUAL="vim"

    Thanks for the feed back.

    --
    Cole
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice