Skip to main content

Fix Port 3000 in use on Mac with lsof and Binnacle tools

Get EADDRINUSE error on Mac? Learn how to find and stop processes holding port 3000 using native Terminal commands or the Binnacle menu bar app.

AI-written
Inewgen
05 Nov 2026Source: Dev.to3 min read (0 views)
Share
Fix Port 3000 in use on Mac with lsof and Binnacle tools

Stock photo for illustration only, not from the actual event

Font size
  • Port 3000 in use errors usually stem from lingering development servers.
  • Built-in macOS tools like lsof and kill resolve port conflicts quickly.
  • Binnacle provides a dedicated command deck and menu bar interface for port management.
  • The Binnacle app requires macOS 14 or later and includes a 14-day trial.

Running npm run dev only to be greeted by the EADDRINUSE: address already in use :::3000 error is a common frustration for developers. Something is occupying the port, typically an overlooked dev server from a closed terminal tab yesterday or a background script. This guide covers how to locate and terminate the culprit, starting with built-in Mac utilities before moving to a streamlined alternative.

First, query which process is actively listening on the port by executing this command in your terminal:

lsof -nP -iTCP :3000 -sTCP :LISTEN

The flags are crucial here. The -n and -P parameters skip DNS and service-name lookups to ensure fast execution, while -iTCP:3000 and -sTCP:LISTEN isolate only the listening sockets so you avoid clutter from connected clients.

terminal code command line screen

Stock photo for illustration only, not from the actual event

This outputs a table where the PID column is what you need. Next, stop the process using the following command:

kill 48213

Never miss the latest news?

Subscribe to get news summaries by email - not often enough to be annoying.

โฆษณา

A standard kill command sends a SIGTERM signal, allowing the process to clean up properly. Give it a moment and rerun the lsof check. If the process persists, use kill -9 48213 to terminate it immediately without prompting, though this should always be a secondary option.

Understanding port allocation mechanics is essential for modern web development, especially since port 3000 is the default choice for frameworks like React, Next.js, and Vite. Juggling multiple local environments frequently leads to port conflicts, making fundamental Terminal commands invaluable tools for maintaining workflow efficiency without rebooting.

While the two-step routine works reliably, remembering additional flags to locate working directories can be tedious. This inspired developers to build dedicated macOS utilities to simplify the process.

Binnacle is a macOS activity monitor living in the menu bar that expands into a full-window console called the Command Deck. It offers two streamlined ways to handle stuck ports:

  • The ⌘K command line: Open the Deck, press ⌘K, and type port 3000 to identify and stop the blocking process with confirmation prompts.
  • The Projects page: Lists active dev servers grouped by project folder, displaying memory usage, idle time, and a convenient stop button.
14Days free trial for Binnacle
$9One-time permanent license fee

If you encounter this issue only once a month, the lsof and kill combination is entirely sufficient. However, for developers running multiple concurrent servers, Binnacle streamlines the debugging workflow. The application requires macOS 14 or later, collects no telemetry data, and limits network traffic strictly to license activation and update checks.

Source: Dev.to

Comments

Leave a Comment
0/2000

Found something wrong in this article? Report an issue with this article