crontab: no crontab for veryv – using an empty one
crontab: “/usr/bin/vi” exited with status 1
How do I fix this issue on a Linux or Unix-like systems?
Tutorial details | |
---|---|
Difficulty | Easy (rss) |
Root privileges | No |
Requirements | None |
Time | 1m |
$ crontab -e
But, if EDITOR or VISUAL is not set, so you will see an error as follows:
Fig.01: Linux crontab: no crontab for veryv – using an empty one
So to fix this error and use vim as a text editor, type (bash/sh/ksh shell specific syntax):
export EDITOR=vim
OR if you are using emacs editor, run:
export EDITOR=emacs
Or if you are using nano text editor, enter:
export EDITOR=nano
Finally, try to edit or set new cron jobs, enter:
crontab -e
I recommend that you edit your shell ~/.bashrc file and append the following line:
export EDITOR=vim
🐧 1 comment so far... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Hello There
Thank you so much for this post. It helped me a lot.
Actually I was trying setup CRON but I haven’t found the correct way and the missing
point which I found here only.
Again, Thank you for sharing this.
Regards.
Thank You.