Loading... ## 1. 问题描述 ummmmm 把系统玩炸了 重装之后发现之前遇到的不能使用wifi问题还发生 就记录一下 之前各种搜索各种论坛博客去逛发现都需要网络下载其他支持包 而我当时就偏不信 我就觉得带界面的centos8默认可以连wifi凭什么无gui的就不可以 我觉得肯定内置了相关的命令 后来我发现是我太年轻了 当时折腾了两天都不行 还是得需要有线网络的支持 然后放弃了... ## 2. 解决方法 #### 2.1 排查问题 输入 `ifconfig -a` 如下 ``` [root@021129 ~]# ifconfig -a eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.31.161 netmask 255.255.255.0 broadcast 192.168.31.255 inet6 fe80::fe34:97ff:fe64:f8d5 prefixlen 64 scopeid 0x20<link> ether fc:34:97:64:f8:d5 txqueuelen 1000 (Ethernet) RX packets 741 bytes 82992 (81.0 KiB) RX errors 0 dropped 8 overruns 0 frame 0 TX packets 925 bytes 218437 (213.3 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 16 memory 0x92300000-92320000 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlp4s0: flags=4098<BROADCAST,MULTICAST> mtu 1500 ether 70:9c:d1:ef:6b:2c txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ``` 显示 `wlp4s0` 未启用 执行 `nmcli d` 后发现 wlp4s0 unmanged ``` [root@021129 ~]# nmcli d DEVICE TYPE STATE CONNECTION eno1 ethernet connected eno1 lo loopback unmanaged -- wlp4s0 wifi unmanaged -- ``` 执行 `ifup wlp4s0` 后发现未输出任何信息 ``` [root@021129 ~]# ifup wlp4s0 Error: unknown connection '/etc/sysconfig/network-scripts/ifcfg-wlp4s0'. ``` #### 2.2 下载依赖 执行 `yum install NetworkManager-wifi` ``` Installed: NetworkManager-wifi-1:1.30.0-7.el8.x86_64 crda-3.18_2020.04.29-1.el8.noarch iw-4.14-5.el8.x86_64 wpa_supplicant-1:2.9-5.el8.x86_64 Complete! ``` #### 2.3 重启 ``` [root@021129 ~]# reboot ``` ![image.png](https://old.qwq.ro/usr/uploads/2021/06/1115266277.png) 此时在输入 `nmcli d` 发现wifi已连接 Last modification:June 16, 2021 © Allow specification reprint Support Appreciate the author AliPayWeChat Like 0 感谢大佬投喂 啾咪~