On Windows I can connect to a specific Wifi using:
netsh wlan connect ssid=SSID1
The command iwconfig doesn't work on Android. The command svc wifi enable just turns the Wifi on. Is there a terminal command for Android that connect to a specific Wifi? I'm using a rooted Cyanogenmod 13.
Try installing the Kali Linux overlay for Android if it's availible for your phone. It supports the
iwconfigcommand and can connect to (password protected) wifi networks via the Nethunter Terminal.