Kill a Process

STEP 1: Finding the PID

Case 1: Terminate the process of a particular program

Command: ps aux | grep “[n]ginx”

Decoding the command:

ps: Process Status

Case 2: Clear a particular port

Command: sudo lsof -i :8080

Decoding the command:

sudo(superuser do): Allows programs to be executed as a root user

STEP 2: Killing the Process

Command: sudo kill -9 12514

Decoding the command:

sudo(superuser do): Allows programs to be executed as a root user

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abhay Jain

Abhay Jain

Developer with 3 yrs of industrial experience in developing scalable web applications.