I ran crontab -e
and made some changes, now how do I save it?
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.
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
-
2
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.
-
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 BotFeb 16, 2022 at 13:12