LAN
bookworm
set-a-static-ip-address-on-raspberry-pi-os-bookworm
NetworkManager
sudo nmcli -p connection show
IPv4, Router, DNS-Server and restart
sudo nmcli c m "Wired connection 1" ipv4.addresses 192.168.6.8/24 ipv4.method manual
sudo nmcli c m "Wired connection 1" ipv4.gateway 192.168.6.1
sudo nmcli c m "Wired connection 1" ipv4.dns "192.168.6.5"
sudo nmcli c down "Wired connection 1" && sudo nmcli c up "Wired connection 1"
older
sudo nano /etc/dhcpcd.conf
https://www.abelectronics.co.uk/kb/article/31/set-a-static-ip-address-on-raspberry-pi-os-bookworm
static ip_address=192.168.x.y
static routers=192.168.x.x
static domain_name_servers=192.168.x.z
sudo /etc/init.d/networking restart