Posted in Server things

Finding and killing processes using the terminal in OSX

I just accidentally closed my terminal window and had reason to figure out how to kill the processes I had open in terminal tabs so that I can continue to restart and reconfigure them as I work.

ps ax | grep mysqld

will return any processes, including possible the grep itself.

sudo kill [mysqld process number]

shuts that baby off. (You’ll be prompted for the admin password, obvs.)

ps ax | grep mysqld

again to make sure it’s worked.

What are these commands? –from The Unix Command Line (System Administration Commands)

ps : list the processes running on the system

ps : (on its own) list processes owned by current user and that are currently attached to the terminal

ps -x : list processes belonging to the current user whether or not they’re attached to a terminal

ps -ax : list all processes running on the system

ps -aux : list all processes running on the system along with additional information about their resource usage

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s