When you run the command crontab -e
it typically defaults to the vi
or vim
editors. If you type the command Shift+Z+Z you can save any changes in this editor and exit.
To add entries to your crontab using this method you'll need to learn how to use this editor more extensively, which is beyond the scope of this question, and should be easy to find many tutorials on the internet.
If vi
/vim
is too much of a learning curve you can instruct crontab
to use a different editor. Another console based editor that's easier for new people to Linux is nano
, it's typically installed on most distros that I'm familiar with.
$ EDITOR=nano crontab -e
NOTE: To use nano
's menu all the carets (aka ^X) commands at the bottom require the use of the Ctrl key. So to exit, Ctrl+X, for example.
You can of course use any editor here. A easy GUI based editor, if you're using a GNOME based desktop, would be gedit
:
$ EDITOR=gedit crontab -e
This last one might be a challenge to use, for a different set of reasons, if your primary desktop is being run by a user other than root
, which it likely is, so I would go with nano
for starters.
ctrl
+z
stops but I am not able to save the file. What does888
there indicate? – Joker May 21 '14 at 11:37GNU nano …
on the top line). It looks like the file is being edited in some GUI editor in another window. – Gilles 'SO- stop being evil' May 21 '14 at 18:35crontab -e
nothing else. Be it at the top or at the bottom. – Joker May 22 '14 at 04:38