Techs Worldwide has moved to a new location with a new name and more advanced features. Click here to visit Geeks Worldwide for technology news, tutorials, videos, tools, and discussions.
Today: 07/05/2009
 

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.

=======================================================================================

Support Geeks Worldwide:

Link to us:

You can support us by putting a link to our website on your blog or website (code is below).

<a href="http://www.techsww.com/">
Geeks Worldwide - Tutorials about Software Installation,
Configuration, Administration, Monitoring, Tools, Tips &
Tricks
</a>

OR a simple one.

<a href="http://www.techsww.com/">
Geeks Worldwide - IT related Tutorials
</a>

Feedbacks:

We appreciate feedbacks and suggestions about our tutorials and Geeks Worldwide from readers. Please contact us using the form here and let us know what you think about the tutorial and the website in general.

Bookmark Us:

We are working on new features for the website, please keep visiting or bookmark us using your favourite bookmarking service.

Subscribe to RSS:

You can subscribe to our RSS feed here.



 
Creative Commons License   Valid XHTML 1.0 Transitional Valid CSS