question:
Use a virtual machine to install the minimal installation of CentOS7. After the installation is completed, the virtual machine has no network and cannot ping other IP addresses.
The processing steps are as follows:
1. Log in as root user
2. Query the network
ip add
The default network card is turned off, no IP address, no network
3. Enter the command as root in the terminal
Network card configuration directory: cd /etc/sysconfig/network-scripts/--ls
4. Edit the configuration file: vi ifcfg-ens33
5. Enter the configuration page: press [i] to quickly edit and insert
6. Modify ONBOOT=no to ONBOOT=yes
7. After modification, press [esc]--press [:] and [wq] to save and exit.
8. Restart the network
Enter the command: systemctl restart network
9. Check your own IP through ip add and find that the IP address appears in ens33 .
10. Test: ping baidu.com
11. Restart the server-----reboot