From charlesreid1

(Blanked the page)
No edit summary
Line 1: Line 1:
This page covers methods of connecting to wifi from Linux.


The methods break down as follows:
* Use <code>/etc/network/interfaces</code>
* Use wpa supplicant
* How to connect to encrypted vs. unencrypted wifi
=Use etc network interfaces=
To set the wireless network you want a Linux box to join, you can add the network name and passphrase to <code>/etc/network/interfaces</code>. Better yet, you can create one file for each network you want to have ready to go, and swap them in and out by sourcing them or not from the /etc/network/interfaces file.
This method is described here: http://charlesreid1.com/wiki/Linux/Wireless/2
First, put the wifi configuration information into a file. This will be called mynetwork.cfg, and will be stored in <code>/etc/network/interfaces.d/mynetwork.cfg</code>.
<pre>
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid NetName
wpa-psk NetPassword
</pre>
The next step is to reference this configuration file from the <code>/etc/network/interfaces</code> file. Here is what that file looks like:
<pre>
source /etc/network/interfaces.d/mynetwork.cfg
</pre>
The <code>/etc/network/interfaces.d/</code> folder would contain credentials for several networks, and could be swapped out by editing <code>/etc/network/interfaces</code>.
=WPA Supplicant Method=

Revision as of 05:51, 15 April 2017

This page covers methods of connecting to wifi from Linux.

The methods break down as follows:

  • Use /etc/network/interfaces
  • Use wpa supplicant
  • How to connect to encrypted vs. unencrypted wifi

Use etc network interfaces

To set the wireless network you want a Linux box to join, you can add the network name and passphrase to /etc/network/interfaces. Better yet, you can create one file for each network you want to have ready to go, and swap them in and out by sourcing them or not from the /etc/network/interfaces file.

This method is described here: http://charlesreid1.com/wiki/Linux/Wireless/2

First, put the wifi configuration information into a file. This will be called mynetwork.cfg, and will be stored in /etc/network/interfaces.d/mynetwork.cfg.

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid NetName
wpa-psk NetPassword

The next step is to reference this configuration file from the /etc/network/interfaces file. Here is what that file looks like:

source /etc/network/interfaces.d/mynetwork.cfg

The /etc/network/interfaces.d/ folder would contain credentials for several networks, and could be swapped out by editing /etc/network/interfaces.

WPA Supplicant Method