Skip to content

aos network

Connectivity, addresses, and Wi-Fi

14 commands. Run aos network --help for the same list from the binary, or see every group.

Connectivity facts: the active interface and its address, the joined Wi-Fi network, and the local IP on its own for scripts. No display needed. public-ip asks Cloudflare’s trace endpoint (1.1.1.1/cdn-cgi/trace, no account) for the address the internet sees. vpn status|on|off drives the VPNs the OS itself manages (scutil --nc on macOS, NetworkManager on Linux, rasdial on Windows); VPN apps that run their own tunnel outside those settings do not show up. wifi on/wifi off switch the radio, and wifi join <ssid> joins a saved or open network; a password is only ever read from stdin with --password-stdin (Linux and Windows; macOS refuses new secured networks because its only route puts the password on the command line). wifi-qr prints the QR a phone camera scans to join the current network (WIFI:T:WPA;S:...;;) in the terminal, or as a PNG with --out; the saved password goes in only with --password, read from the keychain on macOS (security find-generic-password, which shows an authorization prompt), from netsh wlan show profile key=clear on Windows and from nmcli on Linux. macOS hides the network name from a terminal without Location access, so name it with --ssid there. ports lists listening TCP ports with the pid and process that own them; give a port to ask who holds it (exit 1 when nobody does), and free it with aos process kill --port=<n>. captive-portal asks connectivitycheck.gstatic.com/generate_204 over plain http without following redirects: a 204 is online, any other answer is a portal (with the login URL from its redirect or meta refresh when it gives one), no answer is offline; it exits 1 unless online. speed runs a small speed test against Cloudflare (speed.cloudflare.com, no account): a burst of empty requests for median ping and jitter, then 100 KB, 1 MB and the rest of a 5 MB download budget, then 2 MB up; --max-mb raises the budget.

Check whether a captive portal (hotel, airport Wi-Fi login) is intercepting the connection

Under WSL / SSH: runs inside WSL (where aos was started). How the host works

Terminal window
aos network captive-portal [--json]
flag values meaning
--json Optional
Terminal window
aos network captive-portal # online | portal <url> | offline; exit 1 unless online
aos network captive-portal --json # state, portal, status, probe

Print the local address of the active interface

Under WSL / SSH: runs inside WSL (where aos was started). How the host works

Terminal window
aos network ip
Terminal window
aos network ip # 192.168.1.20

List listening TCP ports with the pid and process that own them

Under WSL / SSH: runs inside WSL (where aos was started). How the host works

Terminal window
aos network ports [<port>] [--json]
flag values meaning
<port> Optional positional argument
--json Optional
Terminal window
aos network ports
aos network ports 3000 # who is on port 3000; exit 1 if nobody
aos network ports --json

Print this machine’s public IP address as the internet sees it

Under WSL / SSH: runs inside WSL (where aos was started). How the host works

Terminal window
aos network public-ip [--json]
flag values meaning
--json Optional
Terminal window
aos network public-ip
aos network public-ip --json # ip, country, source

Measure ping, jitter, download and upload speed against Cloudflare (~5 MB down, 2 MB up)

Under WSL / SSH: runs inside WSL (where aos was started). How the host works

Terminal window
aos network speed [--max-mb <n>] [--json]
flag values meaning
<n> Optional positional argument
--max-mb Optional
--json Optional
Terminal window
aos network speed
aos network speed --json # ping_ms, jitter_ms, download_mbps, upload_mbps
aos network speed --max-mb 25 # bigger budget, steadier number on fast links

Print the active interface, address, and Wi-Fi network

Under WSL / SSH: runs inside WSL (where aos was started). How the host works

Terminal window
aos network status
Terminal window
aos network status

Disconnect a system VPN by name

Under WSL / SSH: runs inside WSL (where aos was started). How the host works

Terminal window
aos network vpn off <name>
flag values meaning
<name> Required positional argument
Terminal window
aos network vpn off "Work VPN"

Connect a system VPN by name

Under WSL / SSH: runs inside WSL (where aos was started). How the host works

Terminal window
aos network vpn on <name>
flag values meaning
<name> Required positional argument
Terminal window
aos network vpn on "Work VPN"

List the system’s VPN connections and which are connected

Under WSL / SSH: runs inside WSL (where aos was started). How the host works

Terminal window
aos network vpn status [--json]
flag values meaning
--json Optional
Terminal window
aos network vpn status
aos network vpn status --json

Print the Wi-Fi network currently joined

Under WSL / SSH: runs inside WSL (where aos was started). How the host works

Terminal window
aos network wifi
Terminal window
aos network wifi

Join a Wi-Fi network; a password is read from stdin, never argv

Under WSL / SSH: runs inside WSL (where aos was started). How the host works

Terminal window
aos network wifi join <ssid> [--password-stdin]
flag values meaning
<ssid> Required positional argument
--password-stdin Optional
Terminal window
aos network wifi join HomeNet # saved or open network
printf '%s' "$PW" | aos network wifi join HomeNet --password-stdin

Turn the Wi-Fi radio off (drops the connection; confirm first if you are remote)

Under WSL / SSH: runs inside WSL (where aos was started). How the host works

Terminal window
aos network wifi off
Terminal window
aos network wifi off

Turn the Wi-Fi radio on

Under WSL / SSH: runs inside WSL (where aos was started). How the host works

Terminal window
aos network wifi on
Terminal window
aos network wifi on

Show a QR code a phone can scan to join the current Wi-Fi (password only with –password)

Under WSL / SSH: runs inside WSL (where aos was started). How the host works

Terminal window
aos network wifi-qr [--ssid=<name>] [--password] [--out=<file.png>] [--payload]
flag values meaning
--ssid <name> Optional
--password Optional
--out <file.png> Optional
--payload Optional
Terminal window
aos network wifi-qr # QR in the terminal, network name only
aos network wifi-qr --password # include the saved password (macOS asks for authorization)
aos network wifi-qr --password --out=wifi.png
aos network wifi-qr --ssid=GuestNet --payload # print the WIFI:... text instead of a QR