3

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

1
5

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 '14 at 9:21
  • Awarding answer to this one based on votes. Thanks. Nov 13 '14 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 '14 at 9:21
1

This is problem of editor

export EDITOR=nano

Try running this command & then

crontab -e

It solved my problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.