Linux network operation command netstat

  

The syntax of the netstat command is: netstat [options] The common parameters of netstat are as follows: -a Display all sockets including listening -c redisplays every 1 second until the user interrupts it -i Display the information format of all network interfaces as “ifconfig –e” -n Display the network connection situation by the network IP address instead of the name -r Display the core routing table format with “route –e” -t Display the TCP protocol connection Case -u shows the connection status of UDP protocol -v shows the work in progress Example: 1) The netstat command is used on this machine, and its output is as follows: Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 256 10.153.89.66:ssh 10.153.21.168:1054 ESTABLISHED tcp 0 0 10.153.89.66:ssh 10.153.21.166:1222 ESTABLISHED tcp 0 0 10.153.89.66:1521 10.153.21.166:2625 ESTABLISHED tcp 0 0 10.153.89.66 :1521 10.153.21.166:2623 ESTABLISHED …… Active UNIX domain sockets (w/o servers) Pro To RefCnt Flags Type State I-Node Path unix 9 [ ] DGRAM 919 /dev/log unix 2 [ ] STREAM CONNECTED 50246124 unix 3 [ ] STREAM CONNECTED 3914245 /tmp/.ICE-unix/dcop18694-1074144356 unix 3 [ ] STREAM CONNECTED 3914244 unix 3 [ ] STREAM CONNECTED 3914127 /tmp/.X11-unix/X0 .....

Copyright © Windows knowledge All Rights Reserved