Home > Operation and Maintenance > Linux Operation and Maintenance > How to restart the process in linux?

How to restart the process in linux?

藏色散人
Release: 2019-05-21 15:49:20
Original
27119 people have browsed it

How to restart the process in linux?

How to restart a process in Linux?

How to restart the process in Linux:

1. First, use ps -ef to find the execution statement of the process and retain it; the purpose of this is to retain the process The execution parameters remain unchanged;

For example, to restart the process of a single mongodb:

Find:

ps -ef|grep mongod
Copy after login

Get:

root 2928 2903 0 14:51 pts/0 00:00:00 grep /usr/local/mongodb/bin/mongod --config /etc/mongodb.cnf
Copy after login

2. Use kill -9 Kill the process by PID;

kill -9 2928
Copy after login

3. Use the reserved process statement to restart the process;

Execute:

/usr/local/mongodb/bin/mongod --config /etc/mongodb.cnf
Copy after login

.

The above is the detailed content of How to restart the process in linux?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template