Linux Network Operation Commands linux operation command summary github address: https://github.com/zhwj184/shell-work [Java] #/bin/sh # view the http request headertcpdump-s1024-l-A-nhost192.168.9.56tcpdump-s... linux Network Operation related commands linux operation related command summary github address: https://github.com/zhwj184/shell-work [Java] #/bin/sh # view the http request header tcpdump-s 1024-l-A-n host 192.168.9.56 tcpdump-s 1024-l-A src 192.168.9.56 or dst 192.168.9.56 sudo tcpdump-A-s 1492 dst port 80 # When the host with the IP address 192.168.0.5 in the local network is communicating with the outside world, sudo tcpdump-I eth0 src host 192.168.0.5 # view the http request of the network adapter eth0 tcp packet tcpdump-I eth0 port http tcpdump-I eth0 port http or port smtp or port imap or port pop3-l-A | egrep-I 'pass = | pwd = | log = | login = | User = | username = | pw = | passw = | passwd = | password = | pass: | user: | userna me: | password: | login: | pass | user' # View tcp, upd, icmp non-ssh packet tcpdump-n-v tcp or udp or icmp and not port 22 # view the http request packet sudo tcpdump-I eth0 port 80-w-# filter the http response sudo tcpdump-I en1-n-s 0-w-| grep-a-o-E "get \/. * | Host \:. * "# DNS query request response packet sudo tcpdump-I en0 'udp port 53' # nmap-sP specifies to use Ping echo for scanning/24 to view the target network How many hosts are running nmap-sP 192.168.0.1 nmap-sP 192.168.0.0/24 nmap-O www.baidu.com # Netstat is mainly used for Linux/Unix hosts to view their network conditions, for example, the enabled Port, the user service, and the service status netstat-a netstat-nlp # netcat scans the open port nc-z-v-n 172.31.100.7 21-25 # netcat the command will connect to open port 21 and print the banner information of the service running on this port. Nc-v 172.31.100.7 21 # route table of the output network route # The result shows how long the server has been running, how many login users are there, and the overall server performance evaluation (load average ). Uptime # monitor the network card traffic of eth1 iftop-I eth1 # display the traffic in bytes (bytes) (by default, bits ): iftop-B # The IP address is directly displayed without reverse DNS resolution: iftop-n # The connection port number is displayed directly, and the service name is not displayed: iftop-N # display inbound and outbound traffic of a network segment iftop-F 192.168.1.0/24 or 192.168.1.0/255.255.255.0 # nload of the network traffic real-time monitoring tool, view eth0 traffic nload-n eth0 # view the traffic of each network adapter nload-h # IPTraf is a network monitoring tool, which is more powerful than nload and can monitor all traffic, IP traffic, traffic by protocol, you can also set the filter iptraf # view the current configuration of the network interface and the interface name: ifconfig # Open (up) or close (down) the adapter ifconfig <网络名> # Assign an IP address to the adapter: ifconfig <网络名> # Assign the second IP address to the adapter: ifconfig <网络名:实例数> # Display the driver information of a network adapter, suitable for querying software compatibility: ethtool-I eth0 # display network data: ethtool-S # set the adapter connection speed (Mbps) ethtool speed <10 | 100 | 1000> # iwconfig checks basic Wi-Fi network settings, such as SSID, channel, and encryption. In addition, you can modify some advanced settings, including the reception sensitivity, RTS/CTS, fragments, and number of retries # display the current wireless settings, including the interface name: iwconfig # set ESSID (extended service setting reader) or network name: iwconfig <接口名> Essid <网络名> # Wget-S -- spider http://osswin.sourceforge.net/2> & 1 | grep Mod # View mac address cat/sys/class/net/*/address # View eth0 ip ifconfig eth0 | awk '/inet addr/{split ($2, a, ":"); print A [2]} '# curl view the domail name curl-s http://en.m.wikipedia.org/wiki/List_of_Internet_top-level_domains corresponding to the page | sed-n '//{S/<[^>] *> // g; p} '# talnet telnet localhost 6666 # View all network interfaces awk' {print $1} '/proc/net/dev | grep: | sed "s /:. * // g "# view the DNS server version nslookup-q = txt-class = CHAOS version. bind NS. PHX5.NEARLYFREESPEECH. NET
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service