Default editor for modifying crontab in Debian Nano to VI

Source: Internet
Author: User


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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.