Find the process that opened a local internet port

lsof

  • Lists open files and the corresponding processes.
    Note: Root privileges (or sudo) is required to list files opened by others.
    More information: <https://manned.org/lsof>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

lsof -i :{{port}}

click the source code to copy install lsof on any operating system with command-not-found.com