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"
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
Then use this command to stop ng serve.
kill 25782
Top comments (2)
Ouch. No need for such a brutal death (SIGKILL). Just give the process a chance to end his life with a smooth SIGTERM:
Thanks :)