LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 12-22-2005, 04:05 PM   #1
kawatom
LQ Newbie
 
Registered: Nov 2005
Posts: 3

Rep: Reputation: 0
How to change the default crontab editor


I just installed 4.2 and want to change the default crontab editor. Which configuration file is this located?
 
Old 12-22-2005, 04:15 PM   #2
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
When you want to know how a command works, your best bet is to try the manual page. This is straight from "man crontab":

The -e option is used to edit the current crontab using the editor
specified by the VISUAL or EDITOR environment variables. After you
exit from the editor, the modified crontab will be installed automati-
cally. If neither of the environment variables is defined, then the
default editor /usr/bin/editor is used.

In theory this could be different on your system, so you should still check it.
 
Old 12-22-2005, 04:44 PM   #3
dimsh
Member
 
Registered: Aug 2005
Distribution: Debian, Ubuntu, Fedora
Posts: 74

Rep: Reputation: 15
as CroMagnon said, beside, for me, I user this one-command line to edit cron jobs:

Code:
env EDITOR=nano crontab -e
 
Old 12-22-2005, 06:33 PM   #4
kawatom
LQ Newbie
 
Registered: Nov 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by CroMagnon
When you want to know how a command works, your best bet is to try the manual page. This is straight from "man crontab":

The -e option is used to edit the current crontab using the editor
specified by the VISUAL or EDITOR environment variables. After you
exit from the editor, the modified crontab will be installed automati-
cally. If neither of the environment variables is defined, then the
default editor /usr/bin/editor is used.

In theory this could be different on your system, so you should still check it.
Very interesting, I suppose my question should have been "which file do I go to permanently change the Visual or EDITOR enviornment variable?"

I found the answer here -> blog.breuls.org/2005/11/26/default-crontab-editor/
 
Old 04-23-2008, 06:39 PM   #5
Kumado
Member
 
Registered: Oct 2003
Location: Ohio , USA
Distribution: up to Suse 15.1
Posts: 73

Rep: Reputation: 25
I was looking for the same information. I had done before but forgot how and I am adding this reply since it was one of my Google search options, at the top really.

There is a site that deals with cron howto, from command line type:
export VISUAL='pico -w'

or what editor you choose and mine was fine.

the site is : http://www.deluxnetwork.com/linux/guides/crons.php

ttfn

kumado
 
Old 03-06-2011, 01:07 PM   #6
kenbo
LQ Newbie
 
Registered: Feb 2004
Location: upstate NY
Distribution: Manmdrake 9.2
Posts: 12

Rep: Reputation: 5
I know this thread is old but this works well:


Quote:
sudo select-editor
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to change default SUDO editor??? orgee Linux - Software 3 10-12-2004 07:39 PM
howto change the editor of crontab maxut Fedora 4 08-28-2004 04:03 AM
how can I change the default editor (vipw, crontab -e) or pager? Xavius Linux - Newbie 1 04-05-2004 01:45 PM
jEDIT as default editor on a PC saurya_s General 1 03-17-2004 04:00 PM
crontab editor changes slack66 Linux - General 1 08-04-2003 08:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 04:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration