void linux安装过程中如何连接wifi

void linux安装过程中如何连接wifi

安装时虚空Linux, 我跟着/etc/wpa_supplicant/wpa_supplicant.conf我用这个命令复制的示例

cp /etc/wpa_supplicant/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant-wlo1.conf

wpa_supplicant-wlo1.conf然后像这样编辑:

ctrl_interface=/run/wpa_supplicant
ctrl_interface_group=wheel
eapol_version=1
fast_reauth=1
update_config=1

# Add your networks here.
network={
    ssid="MYSSID"
    key_mgmt=NONE
    wep_key0="MYPASSWORD"
    wep_tx_keyidx=0
    auth_alg=SHARED
}

删除现有的wlo1/run/wpa_supplicant/执行以下命令:

wpa_supplicant -i wlo1 -c /etc/wpa_supplicant/wpa_supplicant-wlo1.conf

并重新dhcpcd启动sv restart dhcpcd

但这没有用!然后我删除了这部分:

network={
        ssid="MYSSID"
        key_mgmt=NONE
        wep_key0="MYPASSWORD"
        wep_tx_keyidx=0
        auth_alg=SHARED
    }

来自wpa_supplicant-wlo1.conf并执行:

wpa_passphrase MYSSID MYPASSWORD >> /etc/wpa_supplicant/wpa_supplicant-wlo1.conf

再次删除并执行相同的wlo1命令/run/wpa_supplicant/

wpa_supplicant -i wlo1 -c /etc/wpa_supplicant/wpa_supplicant-wlo1.conf

并重述dhcpcd,它也不起作用!

如何连接?

答案1

这有效:

wpa_passphrase SSID PASSWORD >> /etc/wpa_supplicant/wpa_supplicant-wlo1.conf
wpa_supplicant -B -iwlo1 -c/etc/wpa_supplicant/wpa_supplicant-wlo1.conf

除了输入这两行之外,我不需要做任何事情。

相关内容