I am learning angular 2 and for the first time I am using the angular CLI project to create a sandbox project.
I was able to run the command \"ng serve\" and it wor
With ctrl + z you put the program in the background. On Linux you can get the session back in the foreground with the following command:
fg ng serve
You don't need to kill the process.
We can forcefully kill the port by following command.
kill -2 $(lsof -t -i:4200)
Just restart the IDE you are using, then it will work.
In my case none of the above mentioned worked.
UBUNTU 18.04 VERSION
Below command worked.
sudo kill -9 $(lsof -i tcp:4200 -t)
If you are using VSCode, you have the option to kill terminal and add a new terminal. Close the tab and open a new tab. It worked for me.
Edited: Use ctrl+c and press y. With out killing terminal also, You can proceed. If you want to open a new instance of visual studio and run a different application , you can use ng serve --port 4401.
Not ctrl+Z, you must run for stop ctrl+C