On a unix-based machine, I like to grep for specific processes like this:

ps ax | grep elasticsearch

Sometimes it’s nice to kill off a set of processes that match your pattern. You can use pkill to grep and kill processes. As an example, to kill all processes matching ‘elasticsearch’, run:

pkill -f elasticsearch

Or if you prefer to see the processes before you kill them:

pgrep -lf elasticsearch

pkill can be installed via brew install pkill or sudo apt-get install pkill.