I listed below the 10 basic Linux users should be aware of the network and monitoring commands. Network and Monitoring commands are similar to these: hostname, ping, ifconfig, Iwconfig, netstat, nslookup, traceroute, Finger, Telnet, ethtool to view the Linux server IP address , Manage server network configuration, establish network links between Linux with Telnet and Ethernet, view server information of Linux, etc. Let's look at the use of network and monitoring commands under Linux.
1. hostname
Hostname no option to display host name
Hostname–d Display machine domain name hostname–f display the full hostname and domain name hostname–i display the IP address of the current machine
2. Ping
Ping sends the packet to the user-specified address. When the package is received. The target machine sends a return packet. There are two main functions of ping
1. To confirm that the network connection is unblocked.
2. The speed information used to view the connection.
If you ping www.yahoo.com 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 when you need to receive or send data for error lookups.
4. Iwconfig
The Iwconfig tool is similar to Ifconfig and Ethtool. is for the wireless card. You can use him to view settings for basic Wi-Fi network information, such as SSID, channel, and encryption. There are many other configurations you can also view and modify, including receive sensitivity, rts/cts, send packet size, and retransmission mechanism of the wireless card
5. Nslookup
Nslookup This command, when you have an IP address, 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 be connected to the Internet to use this command.
Example. Nslookup blogger.com
You can also use Nslookup to get the hostname from the IP or get the 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 passed through when it was submitted to the remote system or Web site. Similarly you must link to the Internet to use this command
7. Finger
View user information. Displays the user's login name, real name, and login terminal name and login rights. This is a very old Unix command and is now seldom used
8. Telnet
Connecting to the target host via the Telnet protocol, if the Telnet connection can be completed at either port, it represents a good connection between the two hosts.
telnet hostname Port-telnet host name using the specified port. This is usually used to test whether the host is online or if the network is healthy.
9. Ethtool
Ethtool allows you to view and change many of the network card settings (not including the Wi-Fi network card). You can manage many advanced settings, including TX/RX, checksum, and wake-on-LAN capabilities. Here are some basic commands you might be interested in:
Displays driver information for a specific NIC, especially useful when checking for software compatibility.
Ethtool-i
Initiates the specified behavior of an adapter, such as flashing the adapter's LEDs to help you identify the interface name in multiple adapters or interfaces:
Ethtool-p
Display Network statistics:
Ethtool-s
Set the adapter's connection speed in Mbps:
Ethtool Speed <10|100|1000> Garfielt
Garfielt
Ten. Netstat
Discover the most useful and common Linux commands for host connections. You can use "netstat-g" to query all multicast groups (networks) that the host subscribes to
Netstat-nap | grep Port will display the process ID of the application using the port netstat-a or Netstat–all will display all connections including TCP and UDP netstat--tcp or netstat–t will display TCP connections NETST At--UDP or netstat–u will display a UDP connection netstat-g will display all multicast networks subscribed by that host
10 Linux networks and monitoring commands