Home > Operation and Maintenance > Linux Operation and Maintenance > How to check service status information in Linux

How to check service status information in Linux

王林
Release: 2019-12-17 11:39:46
Original
6076 people have browsed it

How to check service status information in Linux

How to check which services are running on our Linux system? First we enter the following command:

ps -ef
Copy after login

How to check service status information in Linux

Let’s first see if the system contains this service. For example, I want to see my nginx server (note the case):

ps -ef | grep nginx
Copy after login

How to check service status information in Linux

Related video tutorial sharing: linux video tutorial

If you want to kill this service, you can use the following command:

kill ID
Copy after login

How to check service status information in Linux

You can use the above two commands to obtain the ID. The second column is the ID, and the obtained ID is the same (the third line is the command you just entered to search ID).
To view the detailed status of this service, we can use the following command:

service nginx status
Copy after login

How to check service status information in Linux

Other commands are as follows (I use nginx as an example):

重启该服务:sudo service nginx restart
开启该服务:sudo service nginx start
停止该服务:sudo service nginx stop
Copy after login

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of How to check service status information 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
Latest Issues
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template