最新消息:Done.cc 大杂烩。

切换Debian的crontab编辑器

所有文章 Huishu 5953浏览 0评论

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

出现如下所示的界面:
There are 3 alternatives which provide `editor’.

Selection    Alternative
———————————————–
1    /bin/ed
+        2    /bin/nano
*         3    /usr/bin/vim.tiny

Press enter to keep the default[*], or type selection number:

然后选择3使用/usr/bin/vim就可以了。

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

转载请注明:Done.cc » 切换Debian的crontab编辑器

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址