Skip to content
Myr

Fix the command for checking port on macOS in server docs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Grey Li · committed by David Lord · parent 6389c07 · Browse files · 1 file+13 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+13 added−6 removed

  • other:+13 added−6 removed

1 file+13 added−6 removed

modified:docs/server.rst+13 added-6 removed
78 unmodified lines
7980Either identify and stop the other program, or use81``flask run --port 5001`` to pick a different port.8283You can use ``netstat`` to identify what process id is using a port,84then use other operating system tools stop that process. The following85example shows that process id 6847 is using port 5000.83You can use ``netstat`` or ``lsof`` to identify what process id is using84a port, then use other operating system tools stop that process. The85following example shows that process id 6847 is using port 5000.8687.. tabs::8889 .. group-tab:: Linux/Mac89 .. tab:: ``netstat`` (Linux)9091 .. code-block:: text9293 $ netstat -nlp | grep 500094 tcp 0 0 127.0.0.1:5000 0.0.0.0:* LISTEN 6847/python9596 .. group-tab:: Windows96 .. tab:: ``lsof`` (macOS / Linux)9798 .. code-block:: text99100 $ lsof -P -i :5000101 Python 6847 IPv4 TCP localhost:5000 (LISTEN)102103 .. tab:: ``netstat`` (Windows)104105 .. code-block:: text106107 > netstat -ano | findstr 5000108 TCP 127.0.0.1:5000 0.0.0.0:0 LISTENING 6847109103MacOS Monterey and later automatically starts a service that uses port110macOS Monterey and later automatically starts a service that uses port1115000. To disable the service, go to System Preferences, Sharing, and112disable "AirPlay Receiver".113114
43 unmodified lines