Configure Wi-Fi adapters in Linux [closed]

Linux distributions these days come with NetworkManager to allow a user to configure a WiFi network adapter. However I can't seem to figure out how to configure a system-wide network adapter. There seems to be some suggestion that NetworkManager can use some source of data other than the user clicking to get things like WPA passphrases and such, but I can't find even a single rumour of a document explaining how to do this.

I am using Fedora 10 but frankly would consider switching to any distro to get this working in a nice, supported way that doesn't involve me hacking up some network config script that I stick into rc.local. I want the most generic solution possible.

How do I set up a system-wide WiFi network card so that it connects on boot and stays connected?


I think you should be looking at iwconfig and wpa_supplicant. You should be able to use those appropriately within /etc/network/interfaces (on ubuntu or debian at least) to do said config.

Some googling for 'system wide wireless network config' turns up that "Fedora 10 still provides the older system-config-network tools for easy system-wide configuration and activation of your network interfaces" .


You can still use NetworkManager!

Set up your wireless using NetworkManager. Then right-click the NetworkManager applet, choose "Edit Connections...", find your wireless connection under the Wireless tab, choose "Edit", and select the "Available to all users" checkbox. Once your settings have been saved, NetworkManager should bring the connection up on boot without anyone logging in - I tested by switching to a VT before logging in with X, and ifconfig(8) showed an IP address.

(This is on Ubuntu 9.04, which uses NetworkManager 0.7.1.)


Assuming that wlan0 is the name for your wireless interface, you can try creating a configuration file /etc/sysconfig/network-scrpits/ifcfg-wlan0 using the following template.

DEVICE=wlan0
BOOTPROTO=dhcp
ONBOOT=yes
MODE=Managed
ESSID="essid_name"
RATE="auto"
KEY=*********************

Do a reboot or a /etc/init.d/network restart after creating the file. The interface should come up automatically and stay up irrespective of whether you are logged in or not.

If you do not use DHCP and want to manually specify IP details you can add the following properties to the config file above.

IPADDR=x.x.x.x
NETMASK=x.x.x.x
NETWORK=x.x.x.x
BROADCAST=x.x.x.x