eolas/zk/Headless_Raspi_network_setup.md

37 lines
796 B
Markdown
Raw Normal View History

2024-06-12 18:45:04 +01:00
---
id: hb10
title: Headless network setup
2024-06-16 18:15:03 +01:00
tags:
- networks
- Linux
- raspberry-pi
2024-08-03 08:00:03 +01:00
- procedural
2024-06-16 18:15:03 +01:00
created: Wednesday, June 12, 2024
2024-06-12 18:45:04 +01:00
---
2024-06-16 18:15:03 +01:00
2024-06-12 18:45:04 +01:00
# Headless network setup
2024-06-16 18:15:03 +01:00
If you are using a headless system and you aren't using an ethernet connection,
you face a chicken-egg issue of how to connect the device to WiFi via `ssh` when
the device isn't yet on the network.
2024-06-12 18:45:04 +01:00
2024-06-16 18:15:03 +01:00
You can get around this by saving a file called `wp_supplicant.conf` to the
`/boot` directory of the device. This specifies the SSID name and password and
will be used to auto-connect when the device boots.
2024-06-12 18:45:04 +01:00
2024-06-16 18:15:03 +01:00
For example:
2024-06-12 18:45:04 +01:00
2024-06-16 18:15:03 +01:00
```
country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="SKYVL7XP"
scan_ssid=1
psk="WIFI_PASSWORD"
key_mgmt=WPA-PSK
}
```
## Related notes