Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to connect centos system to wifi in VMware

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "centos system in VMware how to connect wifi", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn how to connect the centos system in VMware to wifi "this article.

After installing centos, then set up its network, because my laptop at home is wireless, so the virtual machine can only be connected to wireless, Baidu has a lot of tutorials, because I just learned linux, so every step is very difficult, fortunately, after a night of setting up, finally connected to the WiFi. Now share the steps and the problems you have encountered.

Set up VMware

Be careful

There may be a lot of choices when choosing your own wireless card, and you don't know which one to choose.

At this time, you can open your network settings and see the wireless network card you are using now.

Set your virtual machine network adapter bit bridging mode

Set static IP to the virtual machine

1. Use the ipconfig command to check your computer ip

Because you are connected to wifi, you should look at the IPV4 address of the wireless LAN adapter WLAN.

Set the ip address of the linux virtual machine based on the ip address of the physical host:

Method: modify the configuration file / etc/sysconfig/network-scripts/ifcfg-eth0

The command of many tutorials is vim / etc/sysconfig/network-scripts/ifcfg-eth0, and the first problem you may encounter is to report an error vim command not found. Because we haven't installed vim yet, you don't have to see how to install vim at this time, because we are on the Internet.

You should use vi / etc/sysconfig/network-scripts/ifcfg-eth0. Vi comes with linux. After entering this command, you will enter the edit mode of the configuration file without any accident.

Vim / etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth0 # virtual machine Nic name. TYPE=EthernetONBOOT=yes # power on to enable network configuration. NM_CONTROLLED=yesBOOTPROTO=static # static, static ip, not dhcp, automatically acquires ip addresses. IPADDR=192.168.1.107 # set the static ip address I want to use on the same network segment as the physical host, but not the same. The NETMASK=255.255.255.0 # subnet mask is the same as the physical host. GETWAY=192.168.1.1 # is the same as the physical host DNS1=8.8.8.8 # DNS, just write the Google address. HWADDR=00:0c:29:22:05:4cIPV6INIT=noUSERCTL=no

The second problem that may be encountered is that under the netwotk-scripts folder, there is no so-called ifcfg-eth0 file, but ifcfg-ens33 and ifcfg-lo. Don't panic at this time. You edit the ens33 file through the vi command, and finally rename the file to ok, or I think a new file is OK, but there must be an ifcfg-eth0 configuration file.

An order to change the name

Mv ifcfg-ens33 ifcfg-eth0

If you don't have ifcfg-eth, you need to change ens33, and you need the following two steps.

Edit / etc/default/grub with the vi command and add "net.ifnames=0 biosdevname=0" to the GRUBCMDLINELINUX variable, as follows

GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR= "$(sed's, release. * $, g' / etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT= "console" GRUB_CMDLINE_LINUX= "crashkernel=auto net.ifnames=0 biosdevname=0 rhgb quiet" GRUB_DISABLE_RECOVERY= "true"

Run the command grub2-mkconfig-o / boot/grub2/grub.cfg to regenerate the GRUB configuration and update the kernel parameters.

The third problem that may be encountered is that after modifying the configuration file, I don't know how to save the exit, yes, novice vegetable chicken is a problem with everything (I changed this file 3 times, a pair of bitter tears).

After modification, press ESC, and then enter: wq press enter (note that wq is preceded by a colon)

Finally, restart the network service or restart the machine

Reboot / / restart the machine service network restart / / restart the machine

4. test

Use virtual machine to ping host ip

Use the host ping virtual machine

Use a virtual machine to ping the external network, such as Baidu

The above is all the contents of the article "how to connect the centos system in VMware to wifi". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report