На информационном ресурсе применяются рекомендательные технологии (информационные технологии предоставления информации на основе сбора, систематизации и анализа сведений, относящихся к предпочтениям пользователей сети "Интернет", находящихся на территории Российской Федерации)

Feedbox

12 подписчиков

How to Change the Default crontab Editor

Author: Dave McKay / Source: How-To Geek

Art representing Bash shell on a Linux system
Fatmawati Achmad Zaenuri/Shutterstock.com

Want to have crontab use the editor of your choice instead of the other way around? This tutorial shows you how. These instructions will work with Linux, macOS and other Unix-like operating systems.

The Touchy Subject of Text Editors

A text editor performs a pretty mundane task.

Yet the depth of feeling people associate with their personal preference editor has led to flame wars that have been burning since 1985. We’re not stoking that fire, nor advocating one editor over another. What we’re going to show you is how to change the default editor for crontab to something else, should you choose to.

The crontab -e command will open an editor so that you can edit your cron table. Your cron table holds the list of any scheduled jobs you have set to occur at specified times. We’re not diving into the details of cron jobs in this article. We’re simply looking at the editor associated with the crontab -e command.

RELATED: How to Schedule Tasks on Linux: An Introduction to Crontab Files

The very first time you issue the crontab command with the -e (edit) option in a Bash terminal, you’re asked to pick the editor you’d like to use. Type crontab , a space, -e and press Enter.

crontab -e
crontab -e command

The editor you select is then used to open your cron table. In this example, nano was chosen by pressing the 1 key.

cron table in nano editor

The editor that you select from the menu is used every time you issue the crontab -e command. If you later change your mind, how do you pick another editor if you only get the menu the first time? That’s easy. The command to use is select-editor.

select-editor
select-editor command

So far, so…

Click here to read more

The post How to Change the Default crontab Editor appeared first on FeedBox.

Ссылка на первоисточник

Картина дня

наверх