Common Linux commands (version 2)-network communication commands
Network Communication commands
1. write/usr/bin/write
Format: write [user name]
# Write is a real-time communication tool provided that the user has logged on to the server host.
# Use ctrl + D as the end of communication
E.g. write guest
2. wall [write all]/usr/bin/wall
Used to broadcast information to all users
Wall [message] [file name]
3. ping/usr/sbin/ping # Only the root user can run the command to test network connectivity.
Format: ping [Option parameter] IP Address
-C [count] n: run the program after ping n times.
Ping-c 4 192.168.9.5: serves the same purpose as Windows.
-S [size] size: changes the package size. The default value is 65B.
Ping-s 6000 192.168.1.1
Appendix-how to troubleshoot network faults in Linux
1) ping the host of the other party. If the host can be pinged, the network is normal.
2) You cannot ping the local IP address.
If the ping is successful, the TCP/IP protocol is correct.
3) The local IP address cannot be pinged. ping 127.0.0.1
If the ping is successful, it indicates that the TCP/IP protocol is not installed properly. If the TCP/IP protocol is installed, the IP address can be pinged even if there is no Nic.
In addition, even if a host is pinged but cannot be pinged, the Network may not be faulty. There are many possible causes for this situation, so you should study it carefully later.
4. ifconfig [/sbin/ifconfig] # used to view Nic information. The-a option is added by default in Linux, but the-a option must be added to UNIX systems.
E.g.
Ifconfig
Ifconfig eth0 // view only the physical Nic
Ifconfig ech0 192.168.1.104 // set the IP address ~, Only temporarily effective
Appendix-Linux Latent Rules: If you want to change the settings, you must write the configuration file