Home  >  Article  >  Operation and Maintenance  >  How to check whether nginx is installed in Linux

How to check whether nginx is installed in Linux

青灯夜游
青灯夜游Original
2022-06-10 19:58:3015913browse

Two viewing methods: 1. Determine whether nginx is installed successfully by checking whether the nginx process exists. The syntax is "ps -ef | grep nginx". If the output information contains nginx information, the installation is successful. Otherwise, the installation is successful. fail. 2. Determine whether nginx is installed successfully by checking the process ID of nginx. The syntax is "ps -C nginx -o pid". If the process ID is output, it means nginx is installed successfully.

How to check whether nginx is installed in Linux

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

Linux method to check whether nginx is installed

Method 1: Check whether the nginx process exists

Each application running in linux will generate a process. By checking whether the nginx process exists, you can determine whether nginx is successfully installed or whether nginx is running.

ps -ef | grep nginx

The result is as shown below

  • ps -ef: List all processes

  • grep nginx: Filter out and nginx-independent process

Method 2: Check the process id of nginx

ps -C nginx -o pid

Related recommendations:《 Linux video tutorial

The above is the detailed content of How to check whether nginx is installed 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