Change the default editor of crontab to vim in debian
Ebian terminal default editor is nano, such as crontab-e will open nano, this editor is not used to, want to change to vim, of course, your debian system must first install vim. If vim is not installed, enter the following command:
1apt-get install vim
If installed. Enter the following command:
View sourceprint?1update-alternatives-config editor
Here are three options:
01root@fyhqy:~# update-alternatives-there are three candidates for config editor02 to replace editor (provide / usr/bin/editor). 03
04 Select path priority status 05While 06* 0 / bin/nano 40 automatic mode 071 / bin/nano 40 manual mode 082 / usr/bin/vim.basic 30 manual mode 093 / usr/bin/vim.tiny 10 manual mode 10
11 to maintain the current value [*] press enter, or type the selected number: 212update-alternatives: use / usr/bin/vim.basic to provide / usr/bin/editor (editor), in manual mode.
Then select / usr/vim/vim.basic and OK (just enter the number and try again to see if it has become vim).
The difference between vim.tiny and vim.basic is that vim.basic is a full vim, while vim.tiny is a simplified version, which is functionally different, such as not supporting highlights, etc.