How to connect a Linux virtual machine to WiFi

How to connect a Linux virtual machine to WiFi

In life, the Internet is everywhere. We can play games, watch TV series, and browse Weibo through the Internet. Without the Internet, our mobile phones and computers may become useless objects. Due to the high security of the Linux system, the network devices in the system need to be configured before they can be interconnected with the external network. So how do we connect our computers to WiFi? Let’s take a look!

1. Check the routing device

route -n 


Note: Generally, the first route we search using route -n is the default gateway. We need to delete it and then reset it.

2. Delete the route-br0 file



3. Delete or comment out the gateway information

vim ifcfg-br0 


Note: If you use the vim ifcfg-br0 command to view, there is Gateway, which we need to delete or comment out.

4. Set the network information in the configuration file


Note: Comment or delete the gateway information in the /etc/sysconfig/network file.

5. Restart the network

systemctl restart network ##Choose one of the two to reboot 

6. Connect to the Internet

nm-connection-editor ##Open the network connection device 


After the above steps, the virtual machine can connect to WiFi. If WiFi cannot be connected, 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 /

The above is a detailed introduction of how to connect a Linux virtual machine to WiFi. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • Virtual machine realizes static IP login and wireless Internet access
  • Solution to the problem that the virtual machine cannot access the Internet when installing Linux system
  • Graphical method of connecting centos system to wifi in VMware
  • Examples of several ways to access the Internet in Linux under VMware virtual machines
  • Detailed explanation of how to use wireless wifi connection in centos7

<<:  Installation and configuration of MySQL 5.7.17 free installation version

>>:  Detailed example of sharedWorker in JavaScript to achieve multi-page communication

Recommend

Best Practices Guide for Storing Dates in MySQL

Table of contents Preface Do not use strings to s...

Summary of bootstrap learning experience-css style design sharing

Due to the needs of the project, I plan to study ...

Detailed explanation of Vue.js directive custom instructions

Customize a demo command The syntax of Vue custom...

Introduction to JavaScript Number and Math Objects

Table of contents 1. Number in JavaScript 2. Math...

How to connect Navicat to the docker database on the server

Start the mysql container in docekr Use command: ...

Install mysql5.7.17 using RPM under Linux

The installation method of MySQL5.7 rpm under Lin...

How MySQL uses transactions

Basics A transaction is an atomic operation on a ...

Vue implements tree table

This article example shares the specific code of ...

How to use nginx to access local static resources on Linux server

1. Check whether port 80 is occupied. Generally, ...

Summary of all HTML interview questions

1. The role of doctype, the difference between st...

Detailed explanation of Javascript closures and applications

Table of contents Preface 1. What is a closure? 1...

The implementation process of extracting oracle data to mysql database

In the migration of Oracle database to MySQL data...

Practical experience of implementing nginx to forward requests based on URL

Preface Because this is a distributed file system...

js implements axios limit request queue

Table of contents The background is: What will ha...