Setting a Static IP - ajumalp/rpi-nas GitHub Wiki
1st you need to install package dhcpcd5
sudo apt-get install dhcpcd5
Use below command to check status
sudo service dhcpcd status
Edit file dhcpcd.conf to set static IP
sudo nano /etc/dhcpcd.conf
Set code as below there
interface eth0
static ip_address=192.168.0.4/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
You need to restart your Pi now
sudo reboot