DEV Community

Tanatip Siriprathum
Tanatip Siriprathum

Posted on

4 1

How to stop Angular ng serve on Mac/Linux

There're two ways to do this:

First
Use the following command to end the running process.

ctrl + c

Second
When the process is running as background process, use the ps command to find the process ID then use the PID to kill the process.

ps -ef | grep "ng serve"
Enter fullscreen mode Exit fullscreen mode

The output will look like this:

 501 25782 23667   0  5:04PM ttys000    0:22.54 ng serve  
 501 25790 23408   0  5:05PM ttys001    0:00.01 grep ng serve
Enter fullscreen mode Exit fullscreen mode

Then use this command to stop ng serve.

kill 25782
Enter fullscreen mode Exit fullscreen mode

Top comments (2)

Collapse
 
thorstenhirsch profile image
Thorsten Hirsch

Ouch. No need for such a brutal death (SIGKILL). Just give the process a chance to end his life with a smooth SIGTERM:

kill 25782
Enter fullscreen mode Exit fullscreen mode
Collapse
 
tanatip profile image
Tanatip Siriprathum

Thanks :)

Jetbrains image

Is Your CI/CD Server a Prime Target for Attack?

57% of organizations have suffered from a security incident related to DevOps toolchain exposures. It makes sense—CI/CD servers have access to source code, a highly valuable asset. Is yours secure? Check out nine practical tips to protect your CI/CD.

Learn more

👋 Kindness is contagious

Value this insightful article and join the thriving DEV Community. Developers of every skill level are encouraged to contribute and expand our collective knowledge.

A simple “thank you” can uplift someone’s spirits. Leave your appreciation in the comments!

On DEV, exchanging expertise lightens our path and reinforces our bonds. Enjoyed the read? A quick note of thanks to the author means a lot.

Okay