Find which process is using a port

Terminal

Identify PID listening on a specific port.

  1. 1

    macOS/Linux

    lsof -i :<port>
  2. 2

    Linux alt

    ss -lptn 'sport = :<port>'
  3. 3

    Kill process

    kill -15 <pid>

Related commands: lsof, ss, kill