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

Michael H. Warfield mhw at WittsEnd.com
Sat May 3 11:06:28 EDT 2014


On Sat, 2014-05-03 at 13:53 +0000, Crawford Rainwater wrote:
> 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? ;-)

You can do that but, if you have NetworkMangler running, it's probably
easier to go through it.  Besides, you're also then also going to need
to run and manage wpa-supplicant for the connection security.  I've been
there and done that.  WiFi with WPA/WPA2 wireless security is the one
place where I feel that NetworkManager really fufills its role in life.
It blows goats on servers with hardwired permanent connections, but for
WiFi, it earns its keep.

> 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
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
> 

-- 
Michael H. Warfield (AI4NB) | (770) 978-7061 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://mail.ale.org/pipermail/ale/attachments/20140503/e15f656a/attachment.sig>


More information about the Ale mailing list