Table of contents
The first step is to view the network card name, enter the command: ip a
The third step is to change the network card name
The fourth step is to change the name of the network card configuration file
The fifth step is to modify the network card configuration file
The sixth step starts the network card
The demo environment is centos 7.9
The first step is to view the network card name, enter the command: ip a
You can see that the name of the network card is ens192, and the status is state up (enabled).
The second step is to change the status of the network card from enabled to disabled (if you are remote through ip, it will be disconnected) It is recommended to connect to the console
Enter the command: ifdown ens192 and ifconfig ens192down
You can see that the state has changed to state down
The third step is to change the network card name
Enter the command: ip link set ens192 name ens199
Input: ip a You can see that the name has changed from ens192 to ens199
The fourth step is to change the name of the network card configuration file
Enter the command: mv /etc/sysconfig/network-scripts/ifcfg-ens192 /etc/sysconfig/network-scripts/ifcfg-ens199
You can see that the network card has changed from ens192 to ens199
The fifth step is to modify the network card configuration file
Enter the command: vi /etc/sysconfig/network-scripts/ifcfg-ens199
Modify the configuration of name and device to ens199
The sixth step starts the network card
Enter the command: ifconfig ens199 up and ifup ens199
You can see that the network card has been started
Step 7 remote ip login
You can see that the secure crt or xshell tool can log in remotely