Pair Logitech Keyboard via Bluetooth CLI | Generated by AI

Home 2025.11

Prerequisites

The bluetoothctl tool is the standard way to manage Bluetooth in Linux/Ubuntu. Logitech keyboards (like MX Keys, K380, or similar) often require entering a pairing PIN on the keyboard itself.

  1. Open the Bluetooth console:
    bluetoothctl
    

    This enters an interactive shell (prompt changes to [bluetooth]#).

  2. Enable the adapter:
    power on
    

    (If it says “No default controller available,” run list to see your adapter and select <adapter_MAC> if multiple.)

  3. Set up the pairing agent:
    agent on
    default-agent
    

    This enables PIN handling and makes your session the default for pairing.

  4. Start scanning for devices:
    scan on
    

    Keep this running. Your Logitech keyboard should appear after ~10-20 seconds (e.g., as “Logitech K380” or similar, with a MAC address like XX:XX:XX:XX:XX:XX).

  5. Put your Logitech keyboard in pairing mode:
    • Turn it on (if it has a power switch).
    • Press and hold the Bluetooth pairing button (usually on the side or top—check your model; for multi-device models like MX Keys, hold the channel button 1/2/3 for 3-5 seconds until the LED blinks rapidly).
    • If it’s a single-device model, hold the main pairing button.
  6. Pair the device:
    Once it shows in the scan (press Enter to refresh), run:
    pair <MAC_ADDRESS>
    
    • Example: pair 12:34:56:78:9A:BC
    • Ubuntu will prompt for a PIN (often 0000 or 1234 for Logitech—try defaults first).
    • Key step for Logitech: Type the PIN directly on the physical keyboard and press Enter. (If no GUI notifications appear, this is crucial—some users report needing to enable system notifications via gnome-control-center > Notifications, but CLI often bypasses this.)
  7. Trust and connect:
    trust <MAC_ADDRESS>
    connect <MAC_ADDRESS>
    
    • This auto-connects on future use.
  8. Exit the console:
    exit
    

Troubleshooting

If your specific Logitech model (e.g., MX Keys Mini) has unique issues, provide the exact model for tailored steps.

References


Back

x-ai/grok-4-fast

Donate