skanc.com Linux, Microsoft, Raspberry Pi, Python, Android

20Aug/122

Raspberry Pi – Tips & Tricks 3 – Static IP Address and DNS Settings

IP Address Settings

sudo nano /etc/network/interface

 -------------------------------------------------------

auto lo

iface lo inet loopback

iface eth0 inet static

address 192.168.1.X

netmask 255.255.255.0

network 192.168.1.0

broadcast 192.168.1.254

gateway 192.168.1.X

 -------------------------------------------------------

 

DNS Settings

sudo nano /etc/resolv.conf

-------------------------------------------------------

nameserver 192.168.1.1

-------------------------------------------------------

Restart networking

sudo /etc/init.d/networking restart

or

sudo /etc/init.d/networking stop
sudo /etc/init.d/networking start

or
sudo shutdown -r now

Comments (2) Trackbacks (0)
  1. I think the file is resolv.conf, not resolve.conf

  2. resolve.conf should be resolv.conf ; no ‘e’


Leave a comment

No trackbacks yet.