Example with:
nano
router IP: 192.168.0.1
new Raspberry IP: 192.168.0.###
new DNS server (google) 8.8.8.8
1sudo nano /etc/dhcpcd.conf
2#--update file --------------------------------
3
4interface wlan0
5static ip_address=192.168.0.###
6static routers=192.168.0.1
7static domain_name_servers=8.8.8.8
8
9#----------------------------------
10
11sudo nano /etc/hostname
12# change to_new_name
13#----------------------------------
14
15sudo nano /etc/hosts
16change 127.0.0.1 to_new_name
17
Update: #
source: https://goneuland.de/raspberry-pi-statische-ip-adresse-vergeben/
New since Raspberry OS 12 (older than 12. Jan 2025):
sudo nmtui
nmtui:
- network
- manager
- terminal
- user
- interface
last updated: