Configuring a Static IP Address on the Raspberry Pi

A static IP address will ensure that the Raspberry Pi will always have the same IP address. Without a static IP address the DHCP service on your router will randomly assign IP addresses from its IP range. A fixed IP address will make it easier to remotely connect to the Raspberry Pi.

In this example, the IP address for the Raspberry Pi will be set to 192.168.0.17.

Edit the interfaces file by entering the following command at the terminal.
<