Configure temporary IP addresses in Linux and IP addresses in Linux
# Ifconfig
View the NIC information, as shown in:
# Ifconfig eth0 192.168.0.107
Eth0 indicates the first Nic. All configurations in Linux are files, so eth0 indicates the name of the first Nic,
The ip address must be configured according to the ip address of the computer. It must be in the same CIDR Block for communication. For example, all ip addresses must be in the CIDR Block 192.168.0.
After the configuration, you can view the NIC information and then view the eth0 Nic.
After configuring the IP address, run the ping command in the command prompt to check whether the IP address can be pinged.
Note 1: You must set the network adapter of the virtual machine before configuring the IP address.
NOTE 2: the ip address configured in this way will be restored after the system is restarted. You need to directly modify the configuration file to permanently modify the configuration in Linux.