If you don't know your IP address, you can either use the hostname. The ipscanner from my former post should help you finding out the IP address from your Raspberry Pi.
# ssh pi@yourIPaddress
pi@raspberrypi ~ $ cd /etc/network
pi@raspberrypi /etc/network $ sudo vi interfaces
The output should look similar like this.
iface lo inet loopback
iface eth0 inet dhcp
iface wlan0 inet dhcp
now change the line"iface lo inet loopback" to your demands:
iface eth0 inet static
# your IP Address
# your netmask
# your router/modem used as your gateway
Lines starting with `#' are ignored. Note that end-of-line comments are NOT supported, comments must be on a line of their own.
Then make a reboot:
pi@raspberrypi ~ $ sudo reboot
Your Pi should reboot now with the new ip address.
There is a good manual available for the interface.
pi@raspberrypi ~ $ man interfaces
The static Method
This method may be used to define Ethernet interfaces with statically allocated IPv4 addresses.
- address address Address (dotted quad/netmask) required
- netmask mask Netmask (dotted quad or CIDR)
- broadcast broadcast_address Broadcast address (dotted quad, + or -). Default value: "+"
- gateway address - Default gateway (dotted quad)