linux下执行 crontab -e 命令出错

在linux下输入 crontab -e 命令时,发现

no crontab for root - using an empty one
/bin/sh: /usr/bin/vi: No such file or directory
crontab: "/usr/bin/vi" exited with status 127

 

后来发现是没有下载vi编辑器,所以需要把默认编辑器改成vim

# echo "export EDITOR=vim" >> ~/.bashrc
# source ~/.bashrc

然后就搞定了

posted @ 2019-03-05 09:38  溜肉段小能手  阅读(1688)  评论(0编辑  收藏  举报