Debian - Port 80 is blocked, but I don't know by what

In depsite of people got used to netstat for such kind of operations, it's good to know, that Linux has another great (and, actually superior) networking tool — ss. For e. g., to find out which process has opened port 80 you run it so:

sudo ss -pt state listening 'sport = :80'

so there's no need to pipe through external filters. Surely it has lots more useful knobs, so get yourself familiar with it.

For completeness sake and since recently I came across man fuser, I can also mention:

  • sudo fuser 80/tcp — this one also saves you from tinkering at cut/grep/awk… keep in mind this notation is a short-cut, in case there's an ambiguity, you should use one of namespaces allowed with -n …, like sudo fuser -n tcp 80

  • sudo lsof -n -sTCP:LISTEN -i:80 — was pointed out by @wallenborn. Meanwhile -n is not strictly required it's strongly advised since otherwise it uses DNS resolving which usualy slows down output terribly.


Address already in use means that another process is already listening on port 80. Only one process can listen on a given port at a time.

To find the process, run as root:

netstat -tnlp | grep -w 80

The offending process will be listed.


Another option with fewer keystrokes is lsof:

lsof -i :80