Debian的crontab默认的编辑器是nano,用起来很不习惯,怎么才能转回VI呢?
用如下命令即可:

#update-alternatives --config editor
There are 3 choices for the alternative editor (providing /usr/bin/editor).

  Selection    Path                Priority   Status
------------------------------------------------------------
  0            /bin/nano            40        auto mode
  1            /bin/nano            40        manual mode
  2            /usr/bin/vim.basic   30        manual mode
* 3            /usr/bin/vim.tiny    10        manual mode


Press enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in manual mode.

选择2

PS:如果你发现你的定时没有生效,可以/etc/init.d/cron restart命令强制生效一下。

文档更新时间: 2023-06-09 07:22   作者:月影鹏鹏
IT运维支持-AIWALY-月影工作室