Mac OSX What program is using port 80
By:Roy.LiuLast updated:2019-08-17
In Mac OSX, you can use sudo lsof -i :80 to find out what program is using or listening on port 80 :
In terminal
$ sudo lsof -i :80 Password: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME httpd 12649 root 5u IPv6 0xede4ca21f607010b 0t0 TCP *:http (LISTEN) httpd 12650 _www 5u IPv6 0xede4ca21f607010b 0t0 TCP *:http (LISTEN) httpd 12653 _www 5u IPv6 0xede4ca21f607010b 0t0 TCP *:http (LISTEN)
To know the PID detail :
$ ps u 12649 USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root 12649 0.0 0.0 2463084 4020 ?? Ss 5:40PM 0:00.21 /usr/sbin/httpd -D FOREGROUND $ ps u 12650 USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND _www 12650 0.0 0.0 2463084 1580 ?? S 5:40PM 0:00.01 /usr/sbin/httpd -D FOREGROUND
This /usr/sbin/httpd is listening on port 80, should be Apache server.
P.S Tested on Mac OSX Yosemite, v10.10
References
From:一号门
COMMENTS