LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-04-2010, 12:08 AM   #1
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Rep: Reputation: 54
Need to know how to configure a Wi-Fi connection from CLI: iwconfig is not enough


Is there a command I need to type from the pure CLI other than:

Code:
iwconfig wlan0 essid <SSID> key <network key>
to configure a WEP-enabled Internet connection from a pure CLI (no X running)? If so, please post it here.
 
Old 10-04-2010, 12:17 AM   #2
rkski
Member
 
Registered: Jan 2009
Location: Canada
Distribution: CentOS 6.3, Fedora 17
Posts: 247

Rep: Reputation: 51
try getting an IP?

Quote:
#dhclient wlan0
 
Old 10-04-2010, 06:42 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,136
Blog Entries: 3

Rep: Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405
Hi,

Quote:
Originally Posted by Kenny_Strawn View Post
Is there a command I need to type from the pure CLI other than:

Code:
iwconfig wlan0 essid <SSID> key <network key>
to configure a WEP-enabled Internet connection from a pure CLI (no X running)? If so, please post it here.
I suggest that you look at 'How to Ask Questions the Smart Way' so in the future your queries provide information that will aid us in diagnosis of the problem or query. We will aid you when you help yourself to a solution. Provide us with what you have attempted and then maybe someone will be able to assist.

Assuming that your device is 'wlan0' then you should either use 'dhcp' or a static IP assignment. Your command shown assumes that the assignment has been made for an IP address.


As root you can use the below to configure a static IP for your wlan0 on your LAN;

Code:
 ~#ifconfig wlan0 192.168.1.18    #<<< available IP
 ~#route add default gw 192.168.1.1 #<<your gateway
 ~#iwlist wlan0 scan #<< use information to fill in for essid & ap information
 ~#iwconfig wlan0 essid "Your Wireless"
 ~#iwconfig wlan0 key your_key_here
 ~#iwconfig wlan0 ap xx:xx:xx:xx:xx:xx #<<Your _ap_from iwlist
I use the script below to setup my wireless while experimenting.
Code:
  wlan.sh;
  #!/bin/bash
 #
 #10-26-09 13:30 
 #setup the wlan0 device
 #
 /sbin/ifconfig wlan0 192.168.1.18
 /sbin/route add default gw 192.168.1.1
 /sbin/iwconfig wlan0 essid "Your_Wireless_Access"
 /sbin/iwconfig wlan0 key Your_key
 /sbin/iwconfig wlan0 ap 00:00:00:00:00:00 << your AP HW address from above iwlist scan

The above link and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!
 
Old 10-04-2010, 06:46 AM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,782
Blog Entries: 1

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
You might take a look at wicd as well. It now has a console version, wicd-curses that works very nicely.
 
  


Reply

Tags
cli, iwconfig, other_command, wep


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wireless connection works but doesn't show in iwconfig command jayunplugged Linux - Networking 1 03-22-2010 01:29 PM
How to configure wireless network in linux (iwconfig) casualzone Linux - Networking 3 02-07-2010 08:00 PM
Configure network IP via CLI? SlowCoder Linux - Networking 1 02-28-2007 12:02 PM
using encryption with iwconfig (wi-fi connection) MichelGillesMS Linux - Networking 1 04-01-2006 04:22 PM
Unable to configure wireless NIC with iwconfig essdeeay Linux - Wireless Networking 1 12-10-2004 04:56 PM


All times are GMT -5. The time now is 12:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration