How does Linux look at the port of the system? Netstat

zhaozj2021-02-11  207

How to check the port of the system?

Skill administrator (2000-12-22 18:32) 〖Back〗 〖Forward〗

Can be used with a command: netstat -lnp to view the port of the system currently listening. Where l option indicates a port that is listening (listen); n option means that the port number is displayed instead of being converted to port names by viewing / etc / service; the P option indicates the listening program.

E.g:

Netsat -Lactive Internet Connections (Only Servers) Proto Recv-q send-q local address foreign address statetcp 0 0 *: mysql *: * listentcp 0 0 *: NetBIOS-SSN *: * LISTENTCP 0 0 *: SWAT *: * LISTENTCP 0 0 *: www *: * listentcp 0 0 *: Linuxconf *: * listentcp 0 0 *: finger *: * listentcp 0 0 *: login *: * listentcp 0 0 *: shell *: * listentcp 0 0 *: telnet *: * Listentcp 0 0 *: ftp *: * listenudp 0 0 0 Radiusd.301: Netbios-DGM *: * UDP 0 0 RADIUSD.301H: NetBIOS-NS *: * UDP 0 0 *: NetBIOS-DGM *: * UDP 0 0 *: Netbios-ns *: * UDP 0 0 *: NTALK *: * UDP 0 0 *: Talk *: * Raw 0 0 *: ICMP *: * 7RAW 0 0 *: TCP *: * 7Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node Pathunix 0 [ACC] STREAM LISTENING 40250 /tmp/mysql.socknetstat -lnProto Recv-Q Send-Q Local Address Foreign Address Statetcp 0 0 0.0.0.0:3306 0.0.0.0:0.0.0.0:0.0:901 0.0.0.0.0:901 0.0.0.0.0:901 0.0.0.0.0:901 0.0.0.0:

转载请注明原文地址:https://www.9cbs.com/read-3562.html

New Post(0)