Results 1 to 9 of 9

Thread: How to connect to wireless network via terminal?

  1. #1
    Join Date
    Mar 2010
    Location
    Viet Nam
    Beans
    52
    Distro
    Lubuntu 12.04 Precise Pangolin

    How to connect to wireless network via terminal?

    Hi!

    I wonder how we can to connect a wireless network via terminal if we use a minimal *buntu in command line, without network manager. I've found some old threads in ubuntuforums but I still can't figure out.

    Would you please explain to me?

    Thank you .

    Best regards,
    Hung

  2. #2
    Join Date
    Sep 2009
    Location
    surrey uk
    Beans
    2,057
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: How to connect to wireless network via terminal?

    Hi to start you can scan from Terminal with the command
    Code:
    sudo iwlist wlan0 scan
    Then try
    Code:
    iwconfig wlan0 essid NETWORK_ID key s:WIRELESS_KEY
    Where NETWORK_ID is name of network, And WIRELESS_KEY is the key. Then
    Code:
    sudo dhclient wlan0
    Wlan0 is your wireless device
    DUAL BOOT XP & Natty, Trying LFS

  3. #3
    Join Date
    Mar 2007
    Location
    Denver, CO
    Beans
    7,726
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: How to connect to wireless network via terminal?

    I wrote a tutorial on this a ways back -- yes it is old if using computer standards, however the information contained in it still works and is truly a low level way of connecting that shouldn't change unless the wireless tools package is dropped from the linux kernel (which would be rather an outstanding event!!)

  4. #4
    Join Date
    Mar 2010
    Location
    Viet Nam
    Beans
    52
    Distro
    Lubuntu 12.04 Precise Pangolin

    Re: How to connect to wireless network via terminal?

    When I tried "iwconfig wlan0 essid network_name key s:network_password", I got this error:
    Error for wireless request "Set ESSID" (8B1A) :
    SET failed on device wlan0 ; Operation not permitted.

    And then I used sudo, but there was something wrong:
    $ sudo iwconfig wlan0 essid network_name key s:network_password
    Error for wireless request "Set Encode" (8B2A) :
    SET failed on device wlan0 ; Invalid argument.

    What did I do wrong? How could I fix?

    Thank you!

  5. #5
    Join Date
    Mar 2010
    Location
    Viet Nam
    Beans
    52
    Distro
    Lubuntu 12.04 Precise Pangolin

    Re: How to connect to wireless network via terminal?

    Help please .

  6. #6
    Join Date
    Jan 2011
    Beans
    27

    Re: How to connect to wireless network via terminal?

    Don't suppose you ever figured it out? I'm trying to figure it out too.

  7. #7
    Join Date
    Jun 2006
    Beans
    90
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to connect to wireless network via terminal?

    I've gotten that error as well, but only when trying to pass hexadecimal keys with the s: prefix. You may not need the s: prefix at all. It may also be related to trying to enter a WPA/WPA2 passphrase, which is described here:
    http://www.cyberciti.biz/tips/howto-...iguration.html, which suggests using iwpriv as well (not familiar with it).

  8. #8
    Join Date
    Feb 2011
    Beans
    15

    Re: How to connect to wireless network via terminal?

    Hey,

    I don't know if it's still relevant but I was having the same problem and read in the manual that with iwconfig(8) ""Passphrase is currently not supported.", which was why I was getting the error.

    This tread shows you have to connect via terminal with a passphrase:
    http://askubuntu.com/questions/16584...ly-in-terminal

  9. #9
    Join Date
    Feb 2008
    Location
    Texas
    Beans
    22,912
    Distro
    Ubuntu 17.10 Artful Aardvark

    Re: How to connect to wireless network via terminal?

    Thread closed. Please do not post in old threads.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •