Home >Operation and Maintenance >Linux Operation and Maintenance >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
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
Related video tutorial sharing: linux video tutorial
If you want to kill this service, you can use the following command:
kill ID
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
Other commands are as follows (I use nginx as an example):
重启该服务:sudo service nginx restart 开启该服务:sudo service nginx start 停止该服务:sudo service nginx stop
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!