'service apache2 reload' 和 'sudo systemctl restart apache2' 有什么区别?

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

service apache2 reloadsudo systemctl restart apache2有什么区别?

我知道有人使用 sudo 而其他人不使用。 另外,我可以理解重新加载和重新启动之间的区别。 但这两个命令之间的主要区别是什么?

重启=停止+开始
重新加载=保持运行+重新读取配置文件

我们可以这样定义它:

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

现在有重新加载选项。

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.