Which file is used to define system-wide cron jobs in many Linux distributions?

Study for the OSCP Linux Exam. Use our flashcards and multiple-choice questions to test your skills. Each query comes with detailed hints and explanations to enhance your preparedness. Get ready to conquer the exam!

Multiple Choice

Which file is used to define system-wide cron jobs in many Linux distributions?

Explanation:
System-wide tasks are defined in a central cron table that the scheduler reads. In many Linux distributions, that is the /etc/crontab file. It’s the main file where global jobs are placed and it differs from per-user crontabs by including a field for the user to run the command, so the cron daemon knows which account to execute under. Each valid line includes minute, hour, day of month, month, day of week, the user, and the command to run. Some systems also support additional system-wide jobs via files in /etc/cron.d, which use the same format, but /etc/crontab is the primary single file for system-wide definitions. The other options aren’t about scheduling: /etc/hosts maps hostnames to IPs, and /var/log/cron is just a log of cron activity.

System-wide tasks are defined in a central cron table that the scheduler reads. In many Linux distributions, that is the /etc/crontab file. It’s the main file where global jobs are placed and it differs from per-user crontabs by including a field for the user to run the command, so the cron daemon knows which account to execute under. Each valid line includes minute, hour, day of month, month, day of week, the user, and the command to run. Some systems also support additional system-wide jobs via files in /etc/cron.d, which use the same format, but /etc/crontab is the primary single file for system-wide definitions. The other options aren’t about scheduling: /etc/hosts maps hostnames to IPs, and /var/log/cron is just a log of cron activity.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy