The following is a description of the steps of system network configuration. For the creation of centos-7 virtual machine, please refer to the previous article.
Enter the user interface after entering the user name and password for the first time
1. Enter ifconfig (if it does not exist) or
ip addrThe red box is our network card name eth0
2. By order
ll /etc/sysconfig/network-scripts/View all network cards in the target folder.If it doesn’t exist, create or copy a corresponding file through the command, and change the name to ifcfg-eth0; the reason why I have enp0s10f0 is that I saw this name when I was executing IP addr.
vi /etc/sysconfig/network-scripts/ifcfg-eth0, please refer to the following screenshot for editing,
service network restartRestart the network
PS: I have a problem at this step. How to solve this problem
The solution is to click herelink
5. If there is no problem above
ping www.baidu.com #Test whether the network is normal IP addr # view IP address