You can use what hozawa has suggested, but also grep for java processes: ps aux | grep java While this may give you more than what you asked, you can further limit the search with more grepping (for example, once you find out the name of the process you want, grep for that from 'ps aux')