Home>Article>Operation and Maintenance> How to check whether nginx is installed in Linux
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.
#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!