How to Set Up a Static IP on the Raspberry Pi

you can run the following command : " sudo nano /etc/dhcpcd.conf "

Simply by editing dhcpcd.conf file and adding the the 
followings(change IP and interface).  
Then the Pi should use the static IP been assigned next time.
interface eth0
static ip_address=

interface wlan0
static ip_address=
#static routers=
#static domain_name_server=