How to kill a process by port in Mac OS

Sometimes I leave processes running which take up ports on my local machine (e.g., Redis server). I won’t be able to use the port until it’s freed up, but it’s sometimes a chore to figure out how to kill the process by port.

I found the following snippet super useful to kill a process by port in Mac OS:

Just replace the [port] above with the actual numbered port (e.g., 6379).

Insta-photo: #tbt

My grandfather's special Korean passport issued April 1950, just two months before the Korean War broke out. Recently learned that he was the country's chief delegate to the World Health Organization (WHO) and traveled to Geneva that year to negotiate aid for Koreans on the brink of conflict. #tbt #family #history

My grandfather’s special Korean passport issued April 1950, just two months before the Korean War broke out. Recently learned that he was the country’s chief delegate to the World Health Organization (WHO) and traveled to Geneva that year to negotiate aid for Koreans on the brink of conflict. #tbt #family #history

Of Your Next Love

Of your next love, dear, I can hold no rights or demands.
But if I were to bid fate a wish; let him be a good man.

Let him give you everything that he can and is willing,
but not so much that he loses himself or grows bitter,
or so selflessly that you can’t bear the unpayable debt.

Let him not lose faith in himself when he lets you down,
nor in you on the days that try him the hardest.

Let him take pride, not in being your first love,
nor your last love, nor in being your best love,
but merely in being counted among the lucky few.

Let him stir in you the catalysts of inspiration,
and let his fires be stoked by the bellows of your soul.

Let him mind your scars from our time together,
and let him grow impatient with my role in them.
But let him also recognize and appreciate in you,
the parts he loves that others before him have left.

Let him speak with you in all manners of joy and sorrow,
and let him hold you in silence when words can do no more.

Lastly, let me find the strength and peace to not say,
“Let him be a better man to you than I ever was.”
Let me hope, simply and purely, that he be a good man.