Get a List of All Users

Local user information is stored in the /etc/passwd file. Each line in this file represents login information for one user. To view file:

less /etc/passwd

If you want to display only the username you can use either awk or cut commands to print only the first field containing the username:

awk -F: '{ print $1}' /etc/passwd
cut -d: -f1 /etc/passwd

How to start, stop, and restart a cron job

Start a cron job

A cron job is started the moment it is added to the crontab. Note that the task may fail to run if the cron daemon isn’t started. To start the cron service on your Linux machine, run one of the following commands, depending on your Linux distro.

sudo /etc/init.d/cron start

Stop a cron job

You can stop a single cron job by removing its line from the crontab file. To do that, run the crontab -e command and then delete the line for the specific task. Alternatively, you can stop the cron job by commenting it out in the crontab file.

To stop all cron jobs at once and maybe resume them later, you can stop the cron daemon using the following commands:

sudo /etc/init.d/cron stop

Restart a cron job

To restart the cron daemon, run the following commands:

sudo /etc/init.d/cron restart