Skip to content

Can't use 'iw' to operate interfce 'wlan0' #77

Open

Description

@GovenorKratos

Whenver I try to use the script, I get this issue:
WARN: Can't use 'iw' to operate interfce 'wlan0', trying 'iwconfig' (not as good as 'iw') ... (Did you spell the interface name right?)
ERROR: Can't use 'iwconfig' to operate interfce 'wlan0' (iwconfig is not in Fedora's repos)

I'm on Fedora 40. The command I used was:
sudo ./linux-router.sh --ap wlan0 MyAccessPoint -p MyPassPhrase

Activity

  1. dca00 commented on Jun 9, 2024

    @dca00

    You are missing hostapd package: #58

  2. osamwelian3 commented on Apr 12, 2025

    @osamwelian3

    @dca00 Really. hostapd when the error clearly says iw and iwconfig. I am getting the same error and am sure beyond reasonable doubt that I have hostapd installed

  3. GovenorKratos commented on Apr 12, 2025

    @GovenorKratos
    Author

    It’s been a very long time since I created this issue and I’ve since sold the previous laptop and switched to Mac. From what I remember, I managed to get it working by turning it into a shell script and running it with sudo.

    What command did you use? Is your network interface actually wlan0? To double check, you can use the ifconfig command in your shell.

  4. osamwelian3 commented on Apr 12, 2025

    @osamwelian3

    I got it to work

    It’s been a very long time since I created this issue and I’ve since sold the previous laptop and switched to Mac. From what I remember, I managed to get it working by turning it into a shell script and running it with sudo.

    What command did you use? Is your network interface actually wlan0? To double check, you can use the ifconfig command in your shell.

    I realized my network interface was actually not wlan0 to start with but even that did not fix it, it led to another error that said the device was busy. I then found out I could turn off the network interface with

    nmcli radio wifi off

    then: sudo ./linux-router.sh --ap wlan0 MyAccessPoint -p MyPassPhrase
    Replace wlan0 with your network interface

    this would successfully create the ap/wireless hotspot

    then bring wifi back on with:

    nmcli radio wifi off

    Connect to the wifi network and you are able to share your internet. Its a long process but it works.

  5. Primate2490 commented on Mar 9, 2026

    @Primate2490
    Contributor

    Managed it by installing which package. Shell script executes "which iw". If command which returns error, then script thinking iw package is not installed and prints "Can't use 'iw' to operate interface..." and goes further.
    Dear developer, please add which package to the list of dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions