Command Line Interface - continued
In the output, if your wireless card is running, in addition to the above, you will see eth1, wifi0 or something similar, such as:
eth1 IEEE 802.11g ESSID:"Starbucks"
Mode:Managed Frequency:2.427 GHz Access Point: 00:DD:8F:A2:13:B8
Bit Rate=48 Mb/s Tx-Power=20 dBm Sensitivity=8/0Retry limit:7 RTS thr:off Fragment thr:off Power Management:off
Link Quality=61/100 Signal level=-38 dBm Noise level=-81 dBm
Rx invalid nwid:0 Rx invalid crypt:860 Rx invalid frag:0
To configure our Linux wireless network interface, we use iwconfig (interface wireless config), which is coded for the wireless interfaces in mind (you can install iwconfig and the other wireless tools from your distribution’s package manager.) The output of iwconfig will be the same as ifconfig. The important information to note is the interface name, which is eth1 above. Depending on your wireless card, this could be wifi0, ath0, etc..
Second, we have to know which wireless router to connect. We determine this by the SSID (Service Set Identifier.) If we know the SSID of the router to connect -say brighthub-, we issue the iwconfig command as follows:
iwconfig eth1 essid brighthub
However, if your interface is not already in use, you have to get it up to work by issuing ifconfig eth1 up first. Please note this is “ifconfig" not “iwconfig".
When you install iwconfig, your distribution will possibly install all wireless commands; the wireless utilities. In these utilities, there is the iwlist which lists all the access points that your computer can see. To list them, you issue iwlist as follows:
iwlist eth1 scanning
If you read the main pages for iwconfig and iwlist, you will see that there are more options available. For example,
iwconfig eth1 essid brighthub restricted passwd
will associate your linux computer to a wireless network named brighthub through your wireless adapter named eth1 and will send the passwd as the WEP password. To get connected, the final step is the following command: