How to Kill a Development Server

How to Kill a Development Server

Learn How To Kill A Development Server From The Command Line.

Every developer at one time or another has had to manually kill a development server running on their local machine.

In this short tutorial, I will show you how to find and shut down a development server running on Linux or MacOS.

Find the Process the Server Is Running On

To track down the process the server is running on, we run this command:

lsof -i:8000 // Change the number to the port your looking for.

This will output something like:

COMMAND     PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
sales-api 71722 harrison    3u  IPv4 725894      0t0  TCP localhost:irdmi (LISTEN)

Kill the Development Server

To kill the development server run this command:

kill -9 71722 // Change to your PID number.

Did you like it? Why don't you try also...

Change the Server Port that a Spring Boot App is running on

Change the Server Port that a Spring Boot App is running on

Learn how to change the server port that a spring boot application is running on.

Is String a Palindrome?

Is String a Palindrome?

Learn How to Test if a String is a Palindrome in Go.

Docker MySQL, PostgreSQL, and MongoDB

Docker MySQL, PostgreSQL, and MongoDB

Learn how to use Docker to install MySQL, PostgreSQL, and MongoDB