kill -9 ps port number code example Example: stop localhost server netstat -ano | findstr :yourPortNumber tskill typeyourPIDhere