CentOS network operation commands
Network Operation commandsCommand FUNCTION command function ftp Transfer file telnet remote login bye end connection and end program rlogin remote login ping detection host netstat display network status8.1 ftp command
Ftp commands are very important for transferring files. If you see a very important file on the network, you can use this command to upload the file to your machine.
Standard usage:
Ftp (-option) Host Name or IP address
Option description-D display the command execution process in detail to facilitate troubleshooting and Analysis of program execution-I disable interactive mode, no questions-G disable local host file names support extended features of special characters-N is not applicable for automatic login. When FTP is started, it will attempt to automatically log on to the remote system. It will read the content of the. netrc file from the user's referral directory for self-login. If the file does not exist, FTP will discard automatic logon and ask the user's account name-V to display the Command Execution Process
For example, use ftp to log on to the ftp.dark.com host and enter the following command:
Ftp ftp.dark.com
Note: You must have access permissions. Otherwise, you cannot obtain files from the remote system or transmit files to the remote system. To use ftp to transfer files, you must know the valid user name and password on the remote computer.
8.2 bye command
In ftp MODE, input bye to interrupt the current connection job and end ftp execution. There is no option.
8.3 ping command
When you run the ping command, it uses the ICMP transmission protocol to send a request to respond. If the remote host has no network problems, it will respond to the information, so that the host operates normally.
Standard usage:
Ping (-option) Host Name or IP address
Option description c: the number of requests to be responded. The ping Command sends messages repeatedly until the specified number of times is reached. D. Use Socket's SO_DEBUG function F to send network packets to a machine quickly and check its response. Generally, in less than a few seconds, the sent packets will exceed two thousand I seconds to specify the sending and receiving interval, in seconds, with a preset bit of 1 s. The parameter f is not compatible with S bytes to set the data packet size. Pre-set to 56B, with the 8B ICMP header file, a total of 64BR ignore the gateway, directly send the data to the remote host. If the host is not part of the LAN, the error message Q is returned and the command execution process is not displayed. Only the result V is displayed, including non-response information and other information T survival value to set the TTL value. TTL is a value in the IP protocol package. It tells the network whether the packet is discarded because it takes too long in the network.
For example, to check whether the network function of the des.bllod.net host is normal, send the desired message five times at an interval of 10 s. The data packet size is B. Enter the following command:
Ping-c 5-I 10-s 504-t 64 des.blood.net
8.4 telnet command
The main function of the telnet command is to log on remotely. This command allows you to communicate between remote computers using the telnet protocol. You can log on to a remote computer over the network, just as you log on to a local computer and execute commands. To log on to the computer through telnet, you must know the valid user name and password on the remote computer. Telnet only provides terminal Simulation for common terminals, but does not support graphic environments such as X Windows.
Standard usage:
Telnet host name or IP address
For example, to log on to a computer whose IP address is 140.114.63.12, enter the following command:
Telnet 140.114.63.12
Once telnet is successfully connected to the remote system, the logon information is displayed and the user is prompted to enter the user name and password. If the user name and password are correct, you can successfully log on and work on the remote system. After the user finishes the remote session, make sure to use the logout command to exit the remote system. Telnet then reports that the remote session is disabled and returns to the shell prompt on the local machine.
8.5 rlogin command
Rlogin is also used for remote logon. The English meaning of this parameter is remote login. This command is similar to the telnet command, allowing users to start interactive command sessions on the remote system. Usage:
Rlogin (-option) host
Option description 8: 8 characters can be entered. e is used to set escape characters for rlogin sessions. The default escape character is "~". You can specify a text character or an octal number E in the/nnn form to stop any escape characters. When used together with the-8 option, it provides a completely transparent link l user name specifies the user name to log on to the remote host L use litout mode for remote login
For example, you want to log on to another user's computer. Enter the following command:
Rlogin-l inin 140.114.125.24
8.6 netstat command
The main function of the netstat command is to understand the network conditions of the Linux system. If no parameter is specified for the netstat command, the effect is the same as that of the specified-F parameter.
Usage:
Netstat (-option)
Option Description: a displays SocketF in all connections, and shows that all of the fiber is listed, including pending program c continuous list network status I display Network Interface Information n use network IP address instead of name o display timer r display network path table t display TCP connection situation u display UDP protocol connection status v display version information w display RAW transfer protocol connection status