Urgent.News

What's breaking now, across thousands of outlets.

Tech

What's running on my Mac? How to see every dev server and port

A Vite app from this morning, an artisan serve from yesterday, Postgres, Redis, and whatever your coding agent started in the background. By the afternoon most of us have no idea what's actually running. Here's how to see all of it from Terminal. The one command This lists every TCP port something is listening on, with the program and its PID: lsof -nP -iTCP -sTCP :LISTEN A typical afternoon…

When working on a Mac, it can be easy to lose track of what applications and dev servers are running in the background. To get a clear picture of all active processes, use the command "lsof -nP -iTCP -sTCP :LISTEN" in Terminal. This lists every TCP port that something is listening on, along with the program and its Process ID (PID).

For example, a typical afternoon might reveal processes like "node 48213" listening on port 3000, "php 52210" on port 8000, "postgres 611" on port 5432, and "redis-ser 702" on port 6379. Port 3000 enables connections from other devices on your network, while 127.0.0.1 or [::1] implies that only this Mac can access it.

Some processes may appear twice, once for IPv4 and once for IPv6, sharing the same PID. To find out which project a server belongs to, use "ps -p PID -o command=" along with "lsof" to identify the project name (e.g., node or php).

Ports not bound to 127.0.0.1 or [::1] can be reached from your network, making them useful for testing on phones or café Wi-Fi. To check for reachable processes, run "lsof -nP -iTCP -sTCP :LISTEN | grep -vE 127.0.0.1|\[::1\]".

Most development servers only listen on localhost unless you explicitly specify a different host (Vite) or -H 0.0.0.0 (Next.js). Ports used by Docker and Homebrew services appear as the database or service name in "lsof" output, not as the specific app name.

While Activity Monitor provides information on CPU and memory usage, it doesn't show which ports are being used. To get a more comprehensive view of your Mac's processes, consider using a third-party tool like Portlivo, a Mac menu bar app that keeps a live list of servers, their commands, uptime, answering status, CPU and memory usage, and Docker/Homebrew services.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How I Compared Three Approaches to Automating Etsy Fee Math

When I first started selling handmade goods on Etsy, I thought the hardest part would be the crafting. I was wrong. The real nightmare began when I had to figure out how to price my items without…

  • Author struggled with Etsy's complex fee structure
  • Tried manual spreadsheet and generic calculators, both failed
  • Built custom automated script for precise fee calculations

A DEV comment streak can lose an old qualifying week

I expected a streak counter to remember which weeks had qualified. Reading Forem's Community Wellness code showed me a different design: it rebuilds the active streak from the comment and reaction…

  • Community Wellness streak can be lost if old qualifying week fails criteria
  • Streak rebuilt from comment and reaction data at each calculation
  • Single reaction loss can break streak and shorten consecutive qualifying weeks

The swap said 0.000502 WSOL. The wallet got 0.000494 SOL.

After a swap, most people open an explorer to answer three questions: did it work, what did I get, what did it cost. Explorer pages are organised around different questions: which instructions ran…

  • Jupiter swap of DICE for SOL resulted in wallet gaining 0.000494183 SOL
  • Transaction incurred three fees totaling approximately $0.0015
  • Pool fee was 0.000006361 SOL (1.25%)

A crossword gift shop where Gemma 3 4B writes the clues

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle What I Built A side hustle that is live, not a demo: a personalized crossword gift generator with Gemma 3 4B…

  • Personalized crossword gift generator launched on Etsy
  • Gemma 3 4B writes clues based on user memories
  • CAD 24 price, three-day delivery

More from Monday 19 October →