[ale] Making a wifi connection from the command line?

Crawford Rainwater crawford.rainwater at linux-etc.com
Sat May 3 09:53:43 EDT 2014


Is there a reason no one has mentioned "iwconfig" and "iwlist" then perhaps considering "wicd-curses" (the ncurses version of wicd) to Wolf just yet? ;-)

iwconfig is a parallel to ifconfig, just wireless oriented.  iwlist is an extra "on top" to help with finding WAP information (e.g., MAC address, channel, security being used, etc.; no password information of course ;-) ).  Both have man pages that are quite well written to help figure things out.  In general though, iwconfig wlan0 (assuming your wifi adapter is read as "wlan0", otherwise substitute accordingly) will being up something similar to the following (edited for public viewing with "xx" or related comments):

iwconfig wlan0

wlan0     IEEE 802.11bgn  ESSID: <your associated WAP here>
          Mode:Managed  Frequency:2.422 GHz  Access Point: xx:xx:xx:xx:xx:xx   
          Bit Rate=54 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
          Link Quality=70/70  Signal level=-39 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:2  Invalid misc:1826   Missed beacon:0

which is the one most applications (e.g., wicd or NetworkManager) use to configure the wifi.  Then going into the /etc/ configuration file that typically stores this information, and adjust accordingly for future use (/etc/network/interfaces for Ubuntu and related forks as noted by Wolf IIRC).

Most will concur that "wicd" is a bit more "user friendly" if not better than NetworkManager from the CLI and GUI perspectives (I am not trying to start a flame debate on such here for reference).  I know with an Ubuntu + MATE build I did, I swapped these out and have had great experiences with wicd since then (both CLI and GUI wise).  For a Raspberry Pi image I am building that is CLI oriented, wicd-ncurses has been wonderful for "the masses" who are "newbies" at best and need a nice TUI since there will be no GUI.

HTH some.

--- Crawford
PS: I receive the ALE list in Digest format.  Pardon any delays in responding (just respond directly to the list versus "Reply To All" as well; I will receive it eventually) in advance. :-)

The Linux ETC Company
10121 Yates Court
Westminster, CO 80031 USA
voice:  +1.303.604.2550
web:    http://www.linux-etc.com

Please do not print this email unless it is absolutely necessary.  Be friendly to the environment by saving paper.

> ----------------------------------------------------------------------
> Date: Fri, 2 May 2014 10:24:41 -0400
> From: Wolf Halton <wolf.halton at gmail.com>
> Subject: [ale] Making a wifi connection from the command line?
> 
> Wifi on Ubuntu is usually a simple nm-applet in the notifications-bar
> issue: choose the wireless network you want and connect - enter the
> password and it automagically connects to that Wireless network every
> time
> you go there, forever and ever, amen.
> 
> I upgraded UbuntuStudio 13.10 to 14.04Beta over the wire, and there
> were a
> few problems with the Xfce desktop (standard on UbuntuStudio).  The
> nm-applet is running but no icon is visible in the notifications box.
>  The
> Dropbox icon and Copy.com icons are missing as well.
> 
> I cannot find an cli command to get me to connect to a new wifi
> network.  I
> would like to find a cli command to do this.  Hard to believe this is
> not
> an included functionality.
> 
> Would I be better off just to install the whole Gnome desktop and see
> if
> the notifications work correctly there, or backing up /home and
> bare-metal
> installing UbuntuStudio 14.04 again?
> 
> Wolf Halton


More information about the Ale mailing list