在GNU/Linux中查看端口占用情况的命令方法下载
系统大全为您分享
/********************************************************************** Author : Samson* Date : 04/08/2014* Test platform:* Linux debian-IDS 3.13.7* GNU bash, version 4.2.37* *******************************************************************/第一种方法:root@debian:/home/# netstat -antActive Internet connections (servers and established)Proto Recv-Q Send-Q Local Address Foreign Address Statetcp 0 0 127.0.0.1:25 0.0.0.0:* LISTENtcp 0 0 0.0.0.0:33223 0.0.0.0:* LISTENtcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTENtcp 0 0 0.0.0.0:111 0.0.0.0:* LISTENtcp6 0 0 ::1:25 :::* LISTENtcp6 0 0 :::60042 :::* LISTENtcp6 0 0 :::111 :::* LISTENtcp6 0 0 :::80 :::* LISTENtcp6 0 0 111.111.111.120:80 111.111.111.114:1119 ESTABLISHEDtcp6 0 0 111.111.111.120:80 111.111.111.114:1123 ESTABLISHEDtcp6 0 0 111.111.111.120:80 111.111.111.114:1125 TIME_WAITtcp6 0 0 111.111.111.120:80 111.111.111.114:1112 TIME_WAITtcp6 0 0 111.111.111.120:80 111.111.111.114:1110 TIME_WAITtcp6 0 0 111.111.111.120:80 111.111.111.114:1122 ESTABLISHEDtcp6 0 0 111.111.111.120:80 111.111.111.114:1114 TIME_WAITtcp6 0 0 111.111.111.120:80 111.111.111.114:1117 TIME_WAIT第二种方法:root@debian:/home# lsof -i:80COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEapache2 2301 root 4u IPv6 7298 0t0 TCP *:http (LISTEN)apache2 2497 www-data 4u IPv6 7298 0t0 TCP *:http (LISTEN)apache2 2498 www-data 4u IPv6 7298 0t0 TCP *:http (LISTEN)apache2 2499 www-data 4u IPv6 7298 0t0 TCP *:http (LISTEN)apache2 2500 www-data 4u IPv6 7298 0t0 TCP *:http (LISTEN)apache2 2501 www-data 4u IPv6 7298 0t0 TCP *:http (LISTEN)apache2 6108 www-data 4u IPv6 7298 0t0 TCP *:http (LISTEN)apache2 6117 www-data 4u IPv6 7298 0t0 TCP *:http (LISTEN)apache2 6118 www-data 4u IPv6 7298 0t0 TCP *:http (LISTEN)//mysql default portroot@debian:/home# lsof -i:3306COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEmysqld 2992 mysql 10u IPv4 9546 0t0 TCP localhost:mysql (LISTEN)
以上就是系统大全给大家介绍的如何使的方法都有一定的了解了吧,好了,如果知识兔大家还想了解更多的资讯,那就赶紧点击系统大全官网吧。
本文来自系统大全http://www.win7cn.com/如需转载请注明!推荐:win7纯净版
下载仅供下载体验和测试学习,不得商用和正当使用。