文章来源: https://unix.stackexchange.com/a/310699
1 2 3 4 5 6 7
| nmcli con add type wifi ifname wlan0 con-name APname autoconnect yes ssid APname nmcli con modify APname 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared nmcli con modify APname wifi-sec.key-mgmt wpa-psk
nmcli con modify APname wifi-sec.psk "wifipassword" nmcli con up APname
|
如果重启后nmcli con up APname不起作用
请改用此命令来启动 APname
1 2 3
| UUID=$(grep uuid /etc/NetworkManager/system-connections/APname cut -d= -f2) nmcli con up uuid $UUID
|