How to Set a Static IP on a Raspberry Pi Running Debian Bookworm

https://herrbischoff.com/2023/11/how-to-set-a-static-ip-on-a-raspberry-pi-running-debian-bookworm/

This is how I set the static IP successfully:

sudo nmcli -p connection show  ---- to see your connections

sudo nmcli con mod "Wired connection 1" ipv4.addresses 10.10.10.220/24 ipv4.method manual
sudo nmcli con mod "Wired connection 1" ipv4.gateway 10.10.10.1
sudo nmcli con mod "Wired connection 1" ipv4.dns "10.10.10.2"

If you are on the console directly, you can restart the network as follows, otherwise reboot.
sudo nmcli con down "Wired connection 1" && \
sudo nmcli con up "Wired connection 1"

To reset to DHCP, do this:
sudo nmcli con modify "Wired connection 1" ipv4.method auto

Restart network or reboot.
1 Like