The method of connecting WiFi to Linux virtual machine
This article mainly introduces the method of connecting WiFi to the Linux virtual machine, which is very detailed and has a certain reference value. Interested friends must read it!
In life, the network is everywhere. We can play games, watch TV dramas and browse Weibo through the network. Without the network, our mobile phones and computers may become an item that can't do anything. Because of the high security of the Linux system, the network devices in the system need to be configured to connect with the outside network, so how can we connect our computers to WiFi? Let's have a look.
1. View routing Devic
Route-n
Note: generally we use route-n to find the route, the first is the default gateway, we need to delete it, and then reset it.
two。 Delete route-br0 Fil
3. Delete or comment gateway information
Vim ifcfg-br0
Note: if you use the vim ifcfg-br0 command to see that there is Gateway, we need to delete it or comment it out.
4. Set up information about the network in the configuration file
Note: comment or delete the gateway information in the / etc/sysconfig/network file.
5. Restart the network
Systemctl restart network # # either of the two can be reboot
6. Connect to the network
Nm-connection-editor # # Open the network connection device
Through the above steps, the virtual machine can connect to the WiFi. If the WiFi cannot be connected, we can check it through the ls / etc/sysconfig/network-scripts command. If there is an ifcfg-Wired_connection_1, we need to delete this file and restart network.
Mv ifcfg-Wired_connection_1 / above are all the contents of the method of connecting WiFi to the Linux virtual machine. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!