Raspberry Pi OS
How to configure a static IP address
- Find the available interfaces using :
ip a - Add static ip configuration in
dhcpcd.conffile - Restart dhcpcd service
#/etc/dhcpcd.conf
interface wlan0
static ip_address=192.168.2.123/24
static routers=192.168.2.254
static domain_name_servers=8.8.8.8
## reload the service configuration
sudo systemctl daemon-reload
## restart dhcpcd service
sudo systemctl restart dhcpcd.service
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.