iSneaky
Posts: 8
Joined: Sun Nov 16, 2014 11:50 am

Static Ip

Sun Feb 14, 2016 1:47 am

Hello to everyone i want to know how to make my rpi ip static cuz i m going to have a local webserver!
Btw is raspberry pi b+ with latest raspbian

drgeoff
Posts: 10765
Joined: Wed Jan 25, 2012 6:39 pm

Re: Static Ip

Sun Feb 14, 2016 2:00 am

Code: Select all

man dhcpcd.conf

fsr
Posts: 88
Joined: Wed Jan 13, 2016 2:29 am

Re: Static Ip

Sun Feb 14, 2016 2:33 am

you edit /etc/network/interfaces and add the ip configuration

Code: Select all

man interfaces
You'll also need to define DNS servers since they usually come via dhcp. This is done in /etc/resolve.conf

Code: Select all

man resolv.conf
You may also need to set a hostname properly.

Code: Select all

man hostname
this a linux networking 101. there is bucket loads of info out there about it. google is your friend.
https://www.google.com.au/search?num=50 ... aok4iHDycA

https://wiki.debian.org/NetworkConfiguration

User avatar
rpdom
Posts: 17170
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Static Ip

Sun Feb 14, 2016 8:44 am

+1 what drgeoff said.

The /etc/network/interfaces method is deprecated in favour of editing /etc/dhcpcd.conf

Return to “Troubleshooting”