Home  >  Article  >  Operation and Maintenance  >  How to quickly connect a Linux virtual machine to WiFi

How to quickly connect a Linux virtual machine to WiFi

little bottle
little bottleforward
2019-04-29 13:04:483493browse

In life, the Internet is everywhere. We can play games, watch TV series, and browse Weibo through the Internet. Our mobile phones and computers Without the Internet, it may become an item that can't do anything. Due to the high security of the Linux system, the network devices in the system need to be configured to interconnect with the external network. So how do we connect our computers to WiFi? Let’s take a look!

Due to the high security of the Linux system, the network devices in the system need to be configured to interconnect with the external network. So how do we connect our computers to WiFi? This article

  1. View routing devices
route -n

How to quickly connect a Linux virtual machine to WiFi
Note: Generally, the first route we use route -n to find is the default gateway. We need to delete it and set it up again.
2. Delete the route-br0 file
How to quickly connect a Linux virtual machine to WiFi
How to quickly connect a Linux virtual machine to WiFi
3. Delete or comment the gateway information

vim ifcfg-br0

How to quickly connect a Linux virtual machine to WiFi
Note: If using View it with the vim ifcfg-br0 command. There is Gateway in it. We need to delete or comment it out.

  1. Set network information in the configuration file
    How to quickly connect a Linux virtual machine to WiFi
    Note: Comment or delete the gateway information in the /etc/sysconfig/network file.
  2. Restart the network
systemctl restart network   ##两者选一即可
reboot

How to quickly connect a Linux virtual machine to WiFi

  1. Connect to the network
nm-connection-editor     ##打开网络连接设备


Through the above steps, The virtual machine can connect to WiFi. If it cannot connect to WiFi, we can check it through the ls /etc/sysconfig/network-scripts command. If there is ifcfg-Wired_connection_1, you need to delete this file and then restart the network.

mv ifcfg-Wired_connection_1 /

Related tutorials: Linux video tutorial

The above is the detailed content of How to quickly connect a Linux virtual machine to WiFi. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete