What is the difference between 'service apache2 reload' and 'sudo systemctl restart apache2'? What is the difference between 'service apache2 reload' and 'sudo systemctl restart apache2'? shell shell

What is the difference between 'service apache2 reload' and 'sudo systemctl restart apache2'?


Restart = stop + start
Reload = remain running + re-read configuration files


We could define it like this:

Restart--> STOP the service and then it will START the service.

Now comes Reload option.

Reload--> Read .service file for which you have executed the command and if any changes happened it will start using those changes now, so each time a change happens in any service file a reload is needed. You could even see this message coming, lets say you have changed a service and you forgot to reload it so whenever you run any systemctl command towards that service it will throw an error to reload it.