重置wifi连接有哪些可能的命令?
我受到了这个bug的影响,偶尔我的wifi连接因恢复暂停而中断。 问题表现如下:
截图:
有什么可能的命令我可以尝试从命令行运行以重置我的wifi连接而无需重新启动我的系统?
请打开终端并执行:
sudo gedit /etc/systemd/system/wifi-resume.service
如果您没有文本编辑器gedit,请使用nano或kate或leafpad。 将打开一个新的空文件。 添加以下内容:
[Unit] Description=Local system resume actions After=suspend.target [Service] Type=oneshot ExecStart=/bin/systemctl restart network-manager.service [Install] WantedBy=suspend.target
仔细校对两次,保存并关闭文本编辑器。 现在做:
sudo chmod +x /etc/systemd/system/wifi-resume.service
接下来:
sudo systemctl enable wifi-resume.service
重新启动并告诉我们问题是否已解决。
命令是
sudo service network-manager restart
你可以试试
sudo /etc/init.d/network-manager restart dhclient wlan0