Skip to content

Instantly share code, notes, and snippets.

@rcland12
Created June 7, 2026 21:31
Show Gist options
  • Select an option

  • Save rcland12/e17651c2949649a13bb9278788ff2331 to your computer and use it in GitHub Desktop.

Select an option

Save rcland12/e17651c2949649a13bb9278788ff2331 to your computer and use it in GitHub Desktop.
Connect to WiFi on Nvidia Jetson Nano
#!/bin/bash
# wifi-connect.sh - Connect to Wi-Fi using nmcli
# Usage: ./wifi-connect.sh <SSID> <PASSWORD>
set -e
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <SSID> <PASSWORD>"
exit 1
fi
SSID="$1"
PASSWORD="$2"
# Make sure Wi-Fi radio is on
nmcli radio wifi on
# Rescan so the network shows up if it's new
nmcli device wifi rescan >/dev/null 2>&1 || true
sleep 2
# Connect
if sudo nmcli device wifi connect "$SSID" password "$PASSWORD"; then
echo "Connected to '$SSID'."
nmcli -t -f NAME,DEVICE connection show --active
else
echo "Failed to connect to '$SSID'." >&2
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment