10 Practical Linux network and monitoring commands

Source: Internet
Author: User
Tags nslookup command
This article lists the network and monitoring commands that every Linux user should know about. The network and monitoring commands are similar to the hostname, ping, ifconfig, iwconfig, netstat, nslookup, traceroute, finger, telnet, and ethtool commands used to view the li label: Linux command network monitoring.

This article lists the network and monitoring commands that every Linux user should know about. The network and monitoring commands are similar to the hostname, ping, ifconfig, iwconfig, netstat, nslookup, traceroute, finger, telnet, and ethtool commands for viewing linux server IP addresses and managing server network configurations, establish a network connection with linux through telnet and ethernet, and view linux server information. Next let's take a look at the use of network and monitoring commands in Linux.

1. hostname

No option for hostname. the host name hostname-d is displayed. the host name hostname-f is displayed. The Complete host name and domain name hostname-I are displayed.

2. ping

Ping to send data packets to the specified address. When the packet is received, the target machine sends the returned packet. Ping has two main functions:

  • Used to confirm that the network connection is smooth.
  • Used to view the connection speed information.

If you ping www.yahoo.com, it returns its IP address. You can use ctrl + C to stop the command.

3. ifconfig

View the network configurations of a user. It displays the current network device configuration. This tool is extremely useful for error searches that require receiving or sending data.

4. iwconfig

Iwconfig is similar to ifconfig and ethtool. Is used for wireless network interfaces. you can use it to view basic Wi-Fi network information, such as SSID, channel, and encryption. you can also view and modify many other configurations, including the receiver sensitivity, RTS/CTS, the Shard size of sent packets, and the retransmission mechanism of the wireless network adapter.

5. nslookup

When the nslookup command has an IP address, you can use this command to display the host name and find all the IP addresses of the given domain name. You must connect to the internet to use this command.

Example: nslookup blogger.com. You can also use nslookup to obtain the host name from the ip address or the ip address from the host name.

6. traceroute

A convenient tool. You can view the IP address, hop count, and response time of the router when the data packet is submitted to a remote system or website. Similarly, you must connect to the internet to use this command.

7. finger

View user information. Displays the user's logon name, real name, and logon terminal name and permissions. This is a very old unix command, which is rarely used now.

8. telnet

Connect to the target host through telnet. if The telnet connection can be completed on any port, the connection between the two hosts is good.

Telnet hostname port-use the specified port to telnet the host name. This is usually used to test whether the host is online or the network is normal.

9. ethtool

Ethtool allows you to view and change many network card settings (excluding Wi-Fi network cards ). You can manage many advanced settings, including tx/rx, verification, and network wake-up functions. The following are some basic commands that you may be interested in: ethtool-I displays the driver information of a specific Nic. it is particularly useful when checking the software compatibility to start the specified behavior of an adapter with ethtool-p, for example, flashing the LED lights of the adapter, to help you identify the interface name ethtool-s in multiple adapters or interfaces to display network statistics ethtool speed <10 | 100 | 1000> set the connection speed of the adapter, In Mbps

10. netstat

Find the most useful and common Linux commands for host connection. You can use "netstat-g" to query all multicast groups (networks) subscribed to by the host)

Netstat-nap | grep port will display the idnetstat-a or netstat-all process of the application using this port. it will display all the connections including TCP and UDP netstat-tcp or netstat- t will show TCP connection netstat-udp or netstat-u will show UDP connection netstat-g will show all multicast networks subscribed by this host.
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.