Home  >  Article  >  Operation and Maintenance  >  What are the methods to check whether the service is started in Linux?

What are the methods to check whether the service is started in Linux?

王林
王林Original
2019-12-03 13:15:155481browse

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!

Statement:
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