The following describes how to setup a WiFi connection on the default pikvm builds based on Arch Linux. The process might vary for other Linux distros.
I'd recommend to do this while having a display and keyboard connected directly to the Raspberry Pi as you will loose network connectivity once you connect to a WiFi.
**Note:** I'm omitting any sudo prefix for commands as the default installation runs as root anyway. If your installation does not run as root you'll have to add `sudo` in front of each command.
By default the pikvm filesystem is read-only. In order to make changes you'll need to switch to read-write mode. Do this by typing `rw` in the console.
If you want your Raspberry Pi to automatically connect to any configured and available WiFi networks you have to set the following option. On Raspberry Pis wlan0 is the default name of the wlan device.
You can create WiFi profiles either manually or by using `wifi-menu` - GUI. This requires the WiFi you want to connect to in signal range.
```
wifi-menu -o
```
The `-o` makes sure that the WiFi passphrase is stored encrypted. Otherwise it will be stored in cleartext in the profile file. `wifi-menu` will scan for all available WiFi networks and provide you a list:
Afterwards `wifi-menu` will try to connect to the WiFi. If you're connected via ssh or the Web Terminal you'll loose connection to the Raspberry Pi. Most DHCP servers will give the Raspberry Pi a new (and usually different) IP address for each interface (LAN / WLAN).
Copy the second hexadecimal string without *psk=*. In this example _814c45d0f88f60636532b034c463639a506670f8ba3c7965e62cdbc1989f6d66_.
Create a new file with the editor of your choice:
```
nano /etc/netctl/wlan0-wifiname
```
or
```
vi /etc/netctl/wlan0-wifiname
```
Copy the following template into the file and modify it with your parameters.
**Attention:** Please note the \\" after Key= is required for encrypted passphrases. If you want to put your WiFi passphrase in cleartext the \\" is not required. See [this](https://github.com/joukewitteveen/netctl/blob/master/docs/netctl.profile.5.txt) for the quoting rules and more WiFi profile configuration options.
If you want to connect to a 5GHz WiFi in the US and it's not listed, create `/etc/wpa_supplicant/wpa_supplicant-wlan0.conf` with a single line `country=US`, and enable it with: