Fixed IP adress for the Raspberry PI
The Raspberry PI can be assigned a fixed IP adress in your LAN by editing this file:
/etc/dhcpcd.conf
first make a backup copy by typing in a terminal:
sudo cp /etc/dhcpcd.conf /etc/dhcdcp.backup
Then edit the file using nano:
sudo nano /etc/dhcpcd.conf
Place these lines at the bottom of the file to set the Ethernet port (eth0) to a static IP address or in the interface eth0 section (or wlan0 setcion if you use wlan):
interface eth0
static ip_address=192.168.178.72/24
static routers=198.168.178.1
static domain_name_servers=185.93.175.43 185.232.98.76
Set the address (ip_address) to the IP address you want the Raspberry Pi to occupy.
Set the routers value to the gateway address
If available, set to domain_name_servers to your name servers (e.g. pi-hole or the domain servers of your ISP)
Once the file has been updated, use ctrl x to save the file and exit nano.
now reboot to have the changes take effect:
sudo reboot