I assume that Raspbian has been assigned an IP address automatically by your home wireless router using DHCP. To set a static IP address for it:
ifconfig. Note the interface (say
eth0) and the values of the
netstat -nr. Note down the values of the
/etc/dhcpcd.conffile in an editor.
Find the commented lines starting with “Example static IP configuration”. Uncomment the lines concerned with interface, ip_address and router and fill in your details there. For example:
interface eth0 static ip_address=192.168.0.99/24 static routers=192.168.0.1
You will also need to set the DNS servers manually, as described here.
Reboot the system and it should have the static IP address you assigned.
Tried with: Raspbian 9