networking - How to add new network block to wpa_supplicant in command line? - Ask Ubuntu
i want add network block /etc/wpa_supplicant/wpa_suppplicant.conf
file.
the original file looks like,
ctrl_interface=dir=/var/run/wpa_supplicant group=netdev update_config=1 network={ ssid="homewifi" psk="12345678" }
and add new network block in command line, file :
ctrl_interface=dir=/var/run/wpa_supplicant group=netdev update_config=1 network={ ssid="homewifi" psk="12345678" } network={ ssid="new_wifi" psk="00000000" }
i want not manual, command line.
i red https://wiki.archlinux.org/index.php/wpa_supplicant this, if run
# wpa_supplicant -b -i interface -c /etc/wpa_supplicant/wpa_supplicant.conf # wpa_cli > scan ok > scan_results > add_network 0 > set_network 0 ssid "new_wifi" > set_network 0 psk "0000000" > enable_network 0 ctrl-event-connected - connection completed. > save_config ok
will add new network block successfully.
but believe there more easy , simple way. above way takes time, , looks verbose. there more elegant , simple way it?
Comments
Post a Comment