3

I ran crontab -e and made some changes, now how do I save it?

1

4 Answers 4

6

That depends on the editor you run. contab -e uses the editor specified in the environment variable $EDITOR. Mostprobably it's vi or nano.

  • In vi press esc to switch to the command mode, then type :wq to write (w) and quit (q).
  • In nano press ctrl+x, then press y for yes and provide a filename before pressing Enter.
2
  • You have to press escape first with vi
    – DavidPostill
    Nov 12, 2014 at 9:21
  • Awarding answer to this one based on votes. Thanks. Nov 13, 2014 at 11:08
2

when editing it after finishing press esc, then type

:wq

and press enter, that will save the crontab and exit

or just

:w

will save it

1
  • 2
    You have to press escape first with vi
    – DavidPostill
    Nov 12, 2014 at 9:21
1

This is problem of editor

export EDITOR=nano

Try running this command & then

crontab -e

It solved my problem.

0

To save when done editing in crontab editing, press ESC, then hold exactly CTRL+SHIFT+:

then write wq! press enter to save.

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Feb 16, 2022 at 13:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .