What is the difference between service apache2 reload and sudo systemctl restart apache2?
I understand that one uses sudo and others don't. Also, I can understand the difference between reloading and restart. But what is the major difference between these two commands?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With