1
[srinkann@sjc-ads-440 ~]$ crontab -e
no crontab for srinkann - using an empty one
/bin/sh: /usr/bin/vi: No such file or directory
crontab: "/usr/bin/vi" exited with status 127
[srinkann@sjc-ads-440 ~]$

In Google, i got the below solution, but no permission for me to do that.

ln -s /bin/vi /usr/bin/vi

2 Answers 2

4

I suppose that you can use vi. There is a workaround:

crontab -l > crontab.txt
vi crontab.txt
crontab crontab.txt

You can make your modifications in the crontab.txt.

4

execute on the command line AND put the following in your ~/.profile (or ~/.bash_profile or whatever is appropriate for your shell):

EDITOR='/bin/vi'
VISUAL='/bin/vi'
export EDITOR VISUAL

Depending on your shell, you might even be able to do something like this:

EDITOR=$(type -p vim || type -p vi || type -p nvi)
VISUAL="$EDITOR"
export EDITOR VISUAL

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.