Wednesday, June 9, 2010

How to Set up a Wireless Network in Linux

A walkthrough of wireless (IEEE 802.11 also known as WiFi) home networking with Linux.

Steps

When buying a router, note compatibility with Linux. It is wireless adapters that have varying levels of Linux compatibility. If your router isn't new, then turn it on and skip to "Detecting your wireless adapter" (below).

Set up your new router

  1. Plug your router into your internet socket if you want to share your internet.
  2. Plug your router into your PC with an ethernet cable.
  3. Linksys router setup screen
    Linksys router setup screen
    Go to your browser and type in the address "192.168.0.1" or whichever address the router's web server is listening.
  4. Enter your username and password from your router (often "admin" and "admin") then your internet service provider.
  5. Enable wireless and set your encryption (WEP or WPA) and type a memorable passkey.

Detecting your wireless adapter

  1. Your wireless adapter should be detected automatically by your distribution.
  2. Type sudo lshw to list hardware (or lspci or lsusb).
  3. If it's not there you will need to lsmod and modprobe (modules are like drivers).
  4. Typing iwconfig into the terminal can determine what wireless network interfaces have been detected.
  5. If it isn't and you're using Linux Mint, try MintWifi.
  6. You may need to use ndiswrapper and your Windows driver.

Connecting to a network

  1. If you're using KDE, consider KWiFiManager and click "Scan for Networks".
  2. If you're using Gnome, consider NetworkManager.
  3. Choose your "Encryption" (WEP or WPA) and enter your passkey.

No comments: