Skip to main content
PORT 4200 / TCPDev & LocalhostExposure Risk: Low

Port 4200: Angular CLI — Angular Development Server (ng serve)

Default local dev port when running `ng serve` in Angular projects.

Default Service
Angular CLI
Process: node
Transport Protocol
TCP
IANA Registered Port 4200
Docker Port Flag
-p 4200:4200
Container to Host Mapping

How to Check & Kill Process on Port 4200 (EADDRINUSE Fix)

macOS & Linux (lsof / kill)
# Find process using port 4200
sudo lsof -i :4200

# Instantly kill process on port 4200
lsof -ti:4200 | xargs kill -9
Windows (PowerShell & CMD)
# Find PID listening on port 4200
netstat -ano | findstr :4200

# Force kill by PID
taskkill /PID <PID_NUMBER> /F
Cross-Platform Node.js One-Liner
# Kill port 4200 via npx
npx kill-port 4200

# Or diagnose via Castov CLI
npx castov fix "EADDRINUSE :::4200"
Linux Firewall (UFW) & Connectivity Test
# Test if port 4200 is reachable
nc -zv localhost 4200

# Allow or deny port 4200 in UFW
sudo ufw allow 4200/tcp

Frequently Asked Questions about Port 4200

What is Port 4200 used for?

Port 4200 is the standard network port for Angular CLI (Angular Development Server (ng serve)) operating over TCP. The typical system daemon or process is node.

How do I kill a process running on Port 4200 (EADDRINUSE)?

On macOS and Linux, run: lsof -ti:4200 | xargs kill -9 (or npx kill-port 4200). On Windows PowerShell/CMD, run: netstat -ano | findstr :4200 and then taskkill /PID <PID> /F.

Is it safe to expose Port 4200 to the internet?

Port 4200 has a Low security risk profile. Default local dev port when running `ng serve` in Angular projects.

Other Common Network Ports