linux - Difference between /etc/crontab and "crontab -e" - Super User

PHOTO EMBED

Mon Apr 13 2026 09:25:50 GMT+0000 (Coordinated Universal Time)

Saved by @teressider

The format of /etc/crontab is like this:

# m h dom mon dow user      command
*   *  *   *   *  someuser  echo 'foo'
 Save
while crontab -e is per user, it's worth mentioning with no -u argument the crontab command goes to the current users crontab. You can do crontab -e -u <username> to edit a specific users crontab.

Notice in a per user crontab there is no 'user' field.

# m h  dom mon dow  command
*   *   *   *   *   echo 'foo'
 Save
An aspect of crontabs that may be confusing is that root also has its own crontab. e.g. crontab -e -u root will not edit /etc/crontab See Configuring cron.
content_copyCOPY

https://superuser.com/questions/290093/difference-between-etc-crontab-and-crontab-e