How to save Crontab edits?

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

1

4 Answers

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

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

This is problem of editor

export EDITOR=nano

Try running this command & then

crontab -e

It solved my problem.

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

then write wq! press enter to save.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like