Linux Network commands

Source: Internet
Author: User

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

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.