Linux Command Learning 10 network commands and monitoring commands _linux shell

Source: Internet
Author: User
Tags get ip nslookup

Network and Monitoring commands are similar to these: hostname, ping, ifconfig, Iwconfig, netstat, nslookup, traceroute, Finger, telnet, ethtool for viewing linux server IP addresses , Manage server network configuration, establish the network link with Linux through Telnet and Ethernet, view Linux server information, etc. Let's take a look at the use of network and monitoring commands under Linux.
1. hostname

Copy Code code as follows:

Hostname no option to display host name
Hostname–d Display the domain name of the machine
HOSTNAME–F displays the full hostname and domain name
Hostname–i Displays the IP address of the current machine


2. Ping

Ping sends the packet to the user at the specified address. When the package is received. The target machine sends a return packet. Ping has two main functions
1. To confirm that the network connection is unblocked.
2. Used to view the speed information of the connection.
If you ping www.jb51.net it will return its IP address. You can stop the command by CTRL + C.

3. Ifconfig
View the user network configuration. It displays the current network device configuration. This tool is extremely useful for the need to receive or send data error lookup.

4. Iwconfig

The Iwconfig tool is similar to Ifconfig and Ethtool. is used for the wireless network card. You can use him to view setting basic Wi-Fi network information, such as Ssid,channel and encryption. There are many other configurations you can also view and modify, including receiving sensitivity, rts/cts, packet size of packets sent, and retransmission mechanism of the wireless network card.

5. Nslookup

Nslookup This command, when you have an IP address, you can use this command to display the hostname, and you can find all the IP addresses for a given domain name. And you have to connect to the Internet to use this command.
Example

Copy Code code as follows:

Nslookup blogger.com

You can also use Nslookup to get the host name from IP or get IP from the host name.

6. Traceroute

A handy tool. Can be used to view the IP address, hop count, and response time of the router that the packet passes through when it is committed to the remote system or Web site. Also you must link to the Internet to use this command
7. Finger

View user information. Displays the user's login name, real name, and logon terminal name and logon rights. This is a very old Unix command, and it's rarely used now.

8. Telnet

Connect to the target host through the Telnet protocol, which represents a good connection between two hosts if the Telnet connection can be done on either end.
Telnet hostname port– uses the specified port Telnet host name. This is typically used to test whether the host is online or if the network is normal.

9. Ethtool

Ethtool allows you to view and change many of the network card settings (excluding Wi-Fi cards). You can manage a number of advanced settings, including TX/RX, checksum, and network wakeup features. Here are some basic commands you might be interested in:
Displays driver information for a specific network adapter, especially useful when checking software compatibility.

Copy Code code as follows:

Ethtool-i

Start an adapter's specified behavior, such as flashing the adapter's LED light to help you identify the interface name in multiple adapters or interfaces:
Copy Code code as follows:

Ethtool-p

Show Network statistics:

Copy Code code as follows:

Ethtool-s

Set the connection speed of the adapter in Mbps:
Copy Code code as follows:

Ethtool Speed <10|100|1000>


Netstat

Discover the most useful Linux commands for host connections. You can use "netstat-g" to query all multicast groups (networks) that this host subscribes to

Copy Code code as follows:

Netstat-nap | grep Port will show the process ID of the application using that port
Netstat-a or Netstat–all will display all connections that include TCP and UDP
Netstat–tcp or netstat–t will display the TCP connection
NETSTAT–UDP or Netstat–u will display the UDP connection
NETSTAT-G will display all multicast networks that the host subscribes to.

Related Article

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.