$ sudo nmap -sT -O localhost
Starting Nmap 4.10 ( http://www.insecure.org/nmap/ ) at 2006-09-29 21:43 CST
Interesting ports on localhost (127.0.0.1):
Not shown: 1678 closed ports
PORT STATE SERVICE
631/tcp open ipp
Device type: general purpose
Running: Linux 2.4.X|2.5.X|2.6.X
OS details: Linux 2.4.0 – 2.5.20, Linux 2.5.25 – 2.6.8 or Gentoo 1.2 Linux 2.4.19 rc1-rc7, Linux 2.6.3 – 2.6.10
Nmap finished: 1 IP address (1 host up) scanned in 2.314 seconds
$ cat /etc/services |grep 631
ipp 631/tcp # Internet Printing Protocol
ipp 631/udp
$ sudo netstat -anp|grep 631
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 4652/cupsd
$ lsof -i|grep 631
$ lsof -i
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
gaim 5898 exp 16u IPv4 35714 TCP 218.76.63.194:37206->72.14.253.125:xmpp-client (ESTABLISHED)
gaim 5898 exp 17u IPv4 35797 TCP 218.76.63.194:46254->by1msg3245810.phx.gbl:1863 (ESTABLISHED)
opera 5910 exp 17u IPv4 73281 TCP 218.76.63.194:41216->64.233.189.104:www (ESTABLISHED)
opera 5910 exp 58u IPv4 74179 TCP 218.76.63.194:44097->64.233.167.111:pop3s (ESTABLISHED)
$ lsof -l|grep COMM
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
$ lsof -l|grep 631
gnome-pan 5156 1000 mem REG 3,1 16312 181160 /usr/share/locale-langpack/zh_CN/LC_MESSAGES/gnome-screensaver.mo
gaim 5898 1000 mem REG 3,1 26631 847691 /usr/lib/gaim/idle.so
这烂端口,不知道哪里开的。