10 super-practical CentOS networks and monitoring commands

Source: Internet
Author: User
Tags nslookup 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 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 is displayed.

Hostname-d: display the Domain Name of the machine

Hostname-f displays the complete host name and domain name

Hostname-I displays the IP address of the Current Machine

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. Below are some basic commands you may be interested in:

Ethtool-I displays the driver information of a specific network card, which is particularly useful when checking the software compatibility

Ethtool-p starts the specified behavior of an adapter, such as flashing the LED lights of the adapter to help you identify the interface name in multiple adapters or interfaces

Ethtool-s displays network statistics

Ethtool speed <10 | 100 | 1000> sets 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 process id of the application using this port

Netstat-a or netstat-all will display all connections including TCP and UDP

Netstat-tcp or netstat-t will display the TCP Connection

Netstat-udp or netstat-u will display UDP connections

Netstat-g displays all Multicast Networks subscribed to by the 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.