At home in the evening found that I development Board time incredibly advance a day, immediately install NTP to sync time, in order to ensure the Development Board time accurate, decided to add to the crontab, let it regularly updated time, did not think crontab-e after incredibly is I have not seen editor, Online search was found in the original Debian crontab the default use of the Nano editor, ok, and searched the next how to exit the Nano editor, the original is to use ctrl+x, and then according to the prompts to operate, well, in order to facilitate their own, I decided to change the Nano to VI.
System: Debian 7
1. Modify the Nano for VI
Update-alternatives--config Editor
The following prompts appear:
There are 8 choices for the alternative editor (Providing/usr/bin/editor).
Selection Path Priority Status
------------------------------------------------------------
0/usr/bin/joe Auto Mode
* 1/bin/nano Manual mode
2/usr/bin/jmacs Manual Mode
3/usr/bin/joe Manual Mode
4/usr/bin/jpico Manual Mode
5/usr/bin/jstar Manual Mode
6/usr/bin/rjoe Manual Mode
7/usr/bin/vim.basic Manual Mode
8/usr/bin/vim.tiny Manual Mode
Press ENTER to keep the current choice[*], or type selection Number:8
Update-alternatives:using/usr/bin/vim.tiny to Provide/usr/bin/editor (editor) in manual mode.
Maybe everyone's different, because another friend to execute this command, said there are only 5 options, anyway, we have a better look at the election, here I entered is 8, the crontab default editor to the VI.
PS: If no switch succeeds, please restart the cron service yourself manually:/etc/init.d/cron restart
2. To verify
Now enter CRONTAB-E to use the VI editor.