Short guide to Wi-Fi under Linux
Recently I bought notebook and needed to connect to hotel Wi-Fi network (to install Gentoo linux :) All information that I’ve found didn’t help me to setup wireless connection in less a minute. This guilde explains (in very simple way) how to connect your PC to Wi-Fi network under linux.
You should have following applications installed on your PC:
- Wi-Fi driver (this guide covers Intel 3945)
- wireless-tools
- dhcp
Follow these 7 simple steps:
- Load Wi-Fi driver (Intel 3495 specific):
modprobe ipw3945
ipw3945d - Figure out the name of network interface that is bound to Wi-Fi card:
iwconfig - Find list of available networks:
iwlist scanning - Connect to one of it:
iwconfig eth1 essid ESSID
where eth1 – network interface found at the second step and ESSID – id of wireless network found at the third step - (optional, I haven’t used it) If network is secured you should also specify key:
(This sets a hex WEP key)
iwconfig eth0 key 1234123412341234abcd
(This sets an ASCII key – prefix it with “s:”)
iwconfig eth0 key s:some-password - Obtain IP address using DHCP:
dhcpclient eth1 - Make sure that everything is ok:
ifconfig
Probably these steps are too simplistic and will not work in all cases, but they work fine for me and when I was in need for simple instructions I haven’t found such small guide.
Posted by on August 16, 2006 | linux
Antonio August 27, 2006 at 1:33 p.m.
IMHO you'd better call it wlan0 instead of eth1. It does not matter wile you have the only one network connection, but it is non scalable solution. I prefer to see in output of /sbin/ifconfig interfaces like eth0, ppp0, wlan0, bnep0, irda0. It is much easier to understand who is who in this case.