How to view the service status information of linux
How do we see which service is running on our Linux system? First, let's enter the following command:
Ps-ef
Let's first take a look at whether the system includes this service. For example, I want to take a look at my nginx server (pay attention to case):
Ps-ef | grep nginx
If you want to kill the service, use the following command:
Kill ID
You can use either of the above commands to get ID, the second column is ID, and you get the same ID (the third line is the ID you just typed in to search).
To see the detailed status of this service, we can use the following command:
Service nginx status
The other commands are as follows (I'll take nginx as an example here):
Restart the service: sudo service nginx restart start the service: sudo service nginx start stop the service: sudo service nginx stop
These are the details of how linux views service status information. For more information, please follow other related articles!