The network configuration file is stored in /etc/sysconfig/network-scripts. The file name prefix is ifcfg-, followed by the name of the NIC. You can use the double TAB key to view and edit the configuration file, use ifconfig to view the configuration file, or run the following command: Ls /etc/sysconfig/network-scripts/ifcfg-* Lists all device configuration files.
For example, ifcfg-ENO16777984 is the configuration file of the ifcfg-LO local loopback address, which is available on all computers.
Now run vim /etc/sysconfig/network-scripts/ifcfg-eno16777984 to open the configuration file and edit it
Onboot =yes
Copy the code
You can also start the VM in bridge mode and display the IP address