How to specify nano or vim as editor for crontab file -- ubuntu crontab 更改编辑

https://www.garron.me/en/bits/specify-editor-crontab-file.html

If you want to specify an editor, when opening crontab file. And not just use the default for your system. You need to use VISUAL environment variable.

Export the value of VISUAL and then run crontab -e command.

Specify nano as the editor for crontab file

export VISUAL=nano; crontab -e

Specify vim as the editor for crontab file

export VISUAL=vim; crontab -e

Of course you need to have vim or nano installed in your system if you want to use them.

©️2020 CSDN 皮肤主题: 精致技术 设计师:CSDN官方博客 返回首页