1. Network Environment View command:
1.1 ifconfig command: View and configure network commands
1.2 Turn off and start the NIC: Ifdown/ifup NIC device name-disables and enables the NIC device
1.3 Querying network Status:
Netstat option (-TULN: The current computer opens those ports and services and-an: see who is connected to my server)
TIPS:WC Install.log Statistics file How many lines, how many words, how many characters
Netstat-an | grep established | Wc-l count rows, how many services are connected to the current server
NETSTAT-RN:-R lists the routing list with the same functionality as the route command (view default gateway)
1.4 Route Command
Route-n: View the list of routes (you can see the gateway)
Route Add/del default GW 192.168.1.1: Temporarily set up gateways and delete gateways
1.5 Domain Name Resolution command
nslookup [hostname or IP]: memory domain name and IP address resolution
To view a native DNS server:
[email protected] ~]# nslookup
> Server
Default server:192.168.1.1
address:192.168.1.1#53
> Exit
2. Network Test commands:
2.1 Ping 192.168.1.146-c 3: Probe the network condition of the specified IP or domain name, 3 times in the specified number
2.2 Telnet 192.168.0.252 80: Remote Management with Port Probe command (clear text, unsafe, unused, ssh superseded)
2.3 traceroute www.163.com: Route trace Command, option-n means use IP without domain name, faster
2.4 wget http://soft.vpser.net/lnmp/lnmp1.1-full.tar.gz: Download command
2.5 tcpdump Command:(one Test left)
Linux Network commands