Pages

Friday, 29 January 2016

查看 Mac/linux系统的端口开放情况


netstat -nat
netstat -nat | grep 3306
netstat -nat | grep LISTEN
lsof -n -P -i TCP -s TCP:LISTEN

参考链接:

http://www.cnphp6.com/archives/83481
http://ju.outofmemory.cn/entry/131947
http://my.oschina.net/foreverich/blog/402252

(Mac OS和Linux的不同之处):
Mac OS is based on a BSD code base, while Linux is an independent development of a unix-like system. This means that these systems are similar, but not binary compatible.