Skip to content

Instantly share code, notes, and snippets.

@andreibosco
Created January 3, 2014 20:39
Show Gist options
  • Save andreibosco/8246142 to your computer and use it in GitHub Desktop.
Save andreibosco/8246142 to your computer and use it in GitHub Desktop.
Wifi configuration on archlinux ARM

Fonte: http://raspberrypi.stackexchange.com/questions/7987/wifi-configuration-on-arch-linux-arm

The deprecated netcfg used /etc/network.d/ to store profiles. The successor of netcfg is netctl.

In order to setup a wireless network, install netctl using sudo pacman -S netctl. Next, you have to create a network profile. /etc/netctl/examples/ contains some examples. Let's assume you want to setup a WPA2-PSK network. Simply copy over the example file and start editing:

/etc/netctl# install -m640 examples/wireless-wpa wireless-home
/etc/netctl# cat wireless-home
Description='A simple WPA encrypted wireless connection'
Interface=wlan0
Connection=wireless
Security=wpa

IP=dhcp

ESSID='MyNetwork'
# Prepend hexadecimal keys with \"
# If your key starts with ", write it as '""<key>"'
# See also: the section on special quoting rules in netctl.profile(5)
Key='WirelessKey'
# Uncomment this if your ssid is hidden
#Hidden=yes

Edit MyNetwork and WirelessKey as needed. Note the 640 permissions, you do not want to leak your wireless passphrase to the world!

Proceed with testing:

# netctl start wireless-home

If you do not get an error, you should be connected. Let's test this:

$ ping 8.8.8.8

To make this network start on boot:

# netctl enable wireless-home
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment