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

王林
Release: 2019-12-03 13:15:15
Original
5308 people have browsed it

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
Copy after login

Recommended online video tutorial:linux video tutorial

Method 2: Check 6379 (for redis Port number) Whether the port number is occupied

lsof -i :6379
Copy after login

Method 3: Display the tcp port and process and other related information

netstat -tnlp
Copy after login

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!

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 Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!