を使用できます
netstat -pnlt | grep ':portno'
別のオプションとして、サーバーで開いているポートを確認するために nmap ツールを使用できます
nmap -sT -O localhost
出力
Starting nmap 3.55 ( http://www.insecure.org/nmap/ ) at 2004-09-24 13:49 EDT
Interesting ports on localhost.localdomain (127.0.0.1):
(The 1653 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
111/tcp open rpcbind
Device type: general purpose
ネット統計の例:
[[email protected] ~]# netstat -pnlt | grep ':80'
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 :::80 :::* LISTEN 1164/httpd
netstat -anp | grep portNumber
を使用
netstat -nat | grep port | grep LISTEN
だと思います トリックを行う必要があります。