blog/_posts/2016-11-19-automatically-co...

36 lines
1.3 KiB
Markdown

---
title: "Automatically connect to a Wifi with Arch ARM"
date: 2016-11-19
url: automatically-connect-to-a-wifi-with-arch
layout: post
category: Hacking
---
[![A missing blog post image](/img/blog/automatically-connect-to-a-wifi-with-arch.png)](/img/blog/automatically-connect-to-a-wifi-with-arch.png)
[Netctl](https://projects.archlinux.org/netctl.git/) has a feature called `wifi-menu` that we'll use, but this program depends on another one not installed by default: `dialog`.
`# pacman -S dialog`
Once it's done, run :
`# wifi-menu -o wlan0`
Of course, change `wlan0` by the name of the interface set up on your system.
The command allows `wifi-menu` to build a network profile for your Wifi, and will hash the pass-phrase with the option `-o`.
Answers the questions asked by the big blue screen, and if everything is good, you should take back your prompt.
Now run :
`# netctl enable PROFILENAME`
Here `PROFILENAME` is built by default as `${INTERFACE_NAME}-${WIFI_SSID}`.
I let you make the changes, and press 'Enter'.
Now you can reboot as many times as you want, your Pi is supposed to connect itself at startup, to the Wifi.
---
Actually it's not entirely finished, 'cause the official documentation advises us to change the permissions on profiles containing secrets :
`# chmod 0600 /etc/netctl/PROFILENAME`