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

傷城~ 2022-05-15 01:45 209阅读 0赞

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

  1. export VISUAL=nano; crontab -e

Specify vim as the editor for crontab file

  1. export VISUAL=vim; crontab -e

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

发表评论

表情:
评论列表 (有 0 条评论,209人围观)

还没有评论,来说两句吧...

相关阅读