-
Ping test network connectivity between the host
-
Specifies the number of execution -cn
-
-B gateway connectivity test
-
ping -c 10 www.baidu.com # 10 with Baidu server to perform a test ping -b www.baidu.com
-
ifconfig
# Name card
ens33 Link encap: Ethernet HWaddr 00: 0c: 29: df:. 9B: c7 # ipv4 address # gateway # Subnet Mask inet addr: 192.168.71.219 Bcast: 192.168.71.255 Mask: 255.255.255.0 # ipv6 address addr inet6: FE80 :: 187b: 98c3: 897D: ff6d / 64 the Scope: Link # card open # broadcast # line is connected to the network card # # multicast maximum transmission unit the uP bROADCAST the RUNNING the mULTICAST the MTU: 1500 the Metric:. 1 the RX packets : 1,371,319 errors: 0 Dropped: 0 overruns: 0 Frame: 0 the TX packets: 185980 errors: 0 Dropped: 0 overruns: 0 Carrier: 0 Collisions: 0 txqueuelen: 1000 the RX bytes: 855 335 419 (855.3 MB) the TX bytes: 28,644,542 (28.6 MB) # loopback adapter
Link encap LO: the Local the Loopback
inet addr: 127.0.0.1 Mask: 255.0.0.0
inet6 addr: the Scope :: a 1/128: the Host
the UP the LOOPBACK the RUNNING the MTU: the Metric 65536:. 1
the RX packets: 1345 errors: 0 Dropped: 0 overruns: 0 Frame: 0
the TX packets: 1345 errors: 0 Dropped: 0 overruns: 0 Carrier: 0
Collisions: 0 txqueuelen: 1000
the RX bytes: 110 156 (110.1 KB) the TX bytes: 110 156 (110.1 KB) IP address, there are three: 1. extranet 2. LAN network 192.168 172.16 10.0. 3. loopback adapter ip 127.0.0.1 view card information develop ifconfig ens33 # View ens33 card information enable or disable the network card ifconfig ens33 up an interface up ifconfig ens33 down close NIC
# Restart the network
/etc/init.d/networking restart Service Networking restart
-
netstat view network connection status
-a display all
-n Display Port
-p display process
-t tcp
-u udp https://lnmp.org/install.html su root wget http://soft.vpser.net/lnmp/lnmp1 .6.tar.gz -cO lnmp1.6.tar.gz && tar zxf lnmp1.6.tar.gz && cd lnmp1.6 && ./install.sh nginx press any key service nginx start to build up a server to the Service nginx restart Service nginx STOP sudo netstat -ant # show tcp connection protocol and port number displayed sudo netstat -nu # show udp protocol over the connection sudo netstat -antp
Pipe symbol |
As the output of a previous input
sudo ps -a | more -5 # Show all the process paging display per page 5