Home > Article > Operation and Maintenance > What are the methods to check whether the service is started in Linux?
Here is the redis service as an example. For other services, just query and change the name.
Method 1: Check the redis service process
ps -ef|grep redis
Recommended online video tutorial: linux video tutorial
Method 2: Check 6379 (for redis Port number) Whether the port number is occupied
lsof -i :6379
Method 3: Display the tcp port and process and other related information
netstat -tnlp
Recommended related articles and tutorials: linux tutorial
The above is the detailed content of What are the methods to check whether the service is started in Linux?. For more information, please follow other related articles on the PHP Chinese website!