CentOs7 连接无线网络

huangchao|
91

1.查看无线网名称

# ip addr

2.将无线网口开启

# ip link set wlp3s0

3.显示无线网口连接情况

# ip link show wlp3s0

4.显示分配的ip地址,特别适用于查看是否成功通过dhcp自动获取IP地址。

# ip addr show wlp3s0

5.连接无线网账号,密码

# wpa_supplicant -B -i wlp3s0 -c <(wpa_passphrase "无线名称" "无线密码")

6.为wlp3s0自动分配ip地址

# dhclient wlp3s0

7.ping

# ping baidu.com

8.将无线设置为开机启动

(1)设置NetworkManager为自动启动

# chkconfig NetworkManager on

(2)安装NetworkManeger-wifi

# yum -y install NetworkManeger-wifi

(3)开启wifi

#nmcli r wifi on

(4)扫描wifi

#nmcli dev wifi

(5)连接

#nmcli dev wifi connect password