Localhost Academy · 7 lessons · ~48 minutes
The localhost field guide.
Short lessons for things even experienced developers forget until something refuses to stop. Read them in order, or jump to the one that matches today's problem.
-
Localhost is a route back to yourself.
localhost,127.0.0.1, and::1point to your own machine. When a browser openshttp://localhost:3000, it asks your Mac to connect to a process on your Mac. -
A port is a numbered door.
Many processes can run on one machine because each listens on a different port. React might use
3000, Redis6379, FastAPI8000, and Ollama11434. -
A listener is the process waiting at the door.
A listener is a running process that has opened a port and is waiting for connections. Localhost Explorer shows the process name, PID, command, and folder behind it.
-
Wildcard listeners deserve attention.
0.0.0.0:3000or*:3000means the process is listening on all interfaces, not only loopback. Whether other devices can reach it depends on firewall, network, and app settings. -
The PID is not always the owner.
Killing a PID can stop the current process, but launchd, Homebrew, an editor, or a desktop app may own the lifecycle and start it again.
-
The folder tells the story.
A port becomes easier to understand when you can see the working directory. That folder usually reveals the project, tool, or database that launched the listener.
-
The source tells you how to control it.
Terminal commands, Homebrew services, containers, IDE helpers, app helpers, and macOS services have different lifecycle rules. The right owner matters more than the loudest PID.