How to Stop Ubuntu Connecting to a Weak Guest or Wrong Wi-Fi Network Automatically

Walking into your home office or waking your Ubuntu laptop from sleep only to find slow loading pages because Ubuntu latched onto an upstairs guest Wi-Fi, your phone hotspot, or an old 2.4 GHz router — instead of your fast 5 GHz home connection — is a common wireless annoyance. Ubuntu remembers every Wi-Fi password you ever entered and connects automatically unless you change its priority or turn auto-join off. Here is how to make Ubuntu pick your best Wi-Fi network reliably.

1. Disable Connect Automatically on the Unwanted Wi-Fi Network

If you still want to keep an office guest Wi-Fi or family backup network saved just in case your main router goes down, simply stop Ubuntu jumping onto it automatically.

  1. Open Settings from the top-right system menu or app grid.
  2. Click Wi-Fi in the left sidebar.
  3. Click the small gear icon beside the weak or wrong Wi-Fi network name under Known Wi-Fi Networks (or click the three-dot menu top right -> Known Wi-Fi Networks to see saved networks even when out of range).
  4. On the Identity tab, untick Connect automatically.
  5. Click Apply in the top-right corner of the dialogue box.

2. Forget Old Public or Temporary Networks Completely

For hotel lobbies, cafe portals, or old phone hotspots you do not intend to revisit regularly, forgetting the network clears its saved credentials completely so Ubuntu stops scanning and latching onto them.

  • Inside Settings -> Wi-Fi -> click the gear icon beside the unwanted network name.
  • Click the red Forget Connection button at the bottom.

3. Set a Higher Priority for Your Fast Home 5 GHz Wi-Fi

If two saved home networks (such as Home-5G and Home-2.4G) are both in range and you want Ubuntu to always prefer the faster one while keeping the second as an automatic backup:

  1. Press Ctrl + Alt + T to open Terminal and run Ubuntu’s built-in visual network editor:
    nm-connection-editor
  2. Double-click your preferred fast Wi-Fi network in the list.
  3. Switch to the General tab.
  4. Ensure Connect automatically with priority is ticked, and raise its number from 0 up to 10 (leave your backup network at 0 or -1).
  5. Click Save and close the editor.

Higher priority tells Ubuntu’s NetworkManager to always prefer your primary 5 GHz router on startup and wake from sleep, while still leaving your backup connection ready if the main router goes offline.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.