how to stop a running localhost port code example Example: stop localhost server netstat -ano | findstr :yourPortNumber tskill typeyourPIDhere