How to find out if a particular process is running or not (for Linux/Unix)?

I have tried instructions below on Ubuntu Server but should work for all Linux distributions as well as for Unixes (e.g. Max OS X, FreeBSD etc.).

Running the command below will list all running processes on the system.

ps aux

Now, we use the "grep" command to filter out the process we are looking for.

ps aux | grep <process_name>

Replace <process_name> with the name of the process you want to search for. The command above will list all the lines from the output of "ps aux" that contain the string specified with the "grep" command.

For example, if you want to find if Apache Web Server is running or not. You'll run the command as follows:

ps aux | grep httpd

if the output shows some lines with httpd then that means Apache Web Server (or some process with the name "httpd") is running.

Did this tutorial help a little? How about buy me a cup of coffee?

Buy me a coffee at

Please feel free to use the comments form below if you have any questions or need more explanation on anything. I do not guarantee a response.

IMPORTANT: You must thoroughy test any instructions on a production-like test environment first before trying anything on production systems. And, make sure it is tested for security, privacy, and safety. See our terms here.