什么是两者之间的区别?
service apache2 restart
和
/etc/init.d/apache2 restart
基本上为什么建议使用"service"命令而不是直接调用适当的命令?
什么是两者之间的区别?
service apache2 restart
和
/etc/init.d/apache2 restart
基本上为什么建议使用"service"命令而不是直接调用适当的命令?
service
命令在可预知的环境中运行初始化脚本:
来源:http://linux.die.net/man/8/serviceservice在尽可能可预测的环境中运行System V init脚本,删除大部分环境变量,并将当前工作目录设置为/。