Linux命令重启应用程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11395565/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 13:45:44  来源:igfitidea点击:

Linux command to restart application

linuxrestart

提问by Robert

For example - i have process id which i want to restart. What command i should use to restart this process application ? I didn't find something about it(

例如 - 我有我想重新启动的进程 ID。我应该使用什么命令来重新启动此流程应用程序?我没有找到有关它的东西(

Thanks!

谢谢!

回答by Miljen Mikic

You can find very similar question at Restart process script linux.

您可以在Restart process script linux 中找到非常相似的问题。

Linux doesn't have general command for restart, normally you should kill your process and start it over. However, if your process has been started as a service, i.e. it's contained in /etc/init.d/ directory, then you can do the following:

Linux 没有用于重启的通用命令,通常您应该终止进程并重新启动它。但是,如果您的进程已作为服务启动,即它包含在 /etc/init.d/ 目录中,那么您可以执行以下操作:

/etc/init.d/SERVICE_NAME restart

or

或者

service SERVICE_NAME restart