Knowledge Base

The AB Electronics UK Knowledge Base provides support solutions, tutorials and troubleshooting guides.

Knowledge Base

Set a static IP Address on Raspberry Pi OS Wheezy

Static Network IP Address Setup on the Raspberry Pi

This page details how to set up a static network IP address on the Ethernet connection on the Raspberry Pi OS Wheezy image, released September 2013, from https://www.raspberrypi.org/software/operating-systems/.

We will give the Raspberry Pi a static IP address of 10.0.0.220.  The router/gateway address will be set at 10.0.0.1, and the DNS server will also be set to 10.0.0.1

Step 1: Find the name of the network device using the command ifconfig

ifconfig

A list of the available network devices will be shown. The ethernet port is typically called eth0.

Step 2: Now we need to create a file in /etc/network/interfaces.d/ called eth0

sudo nano /etc/network/interfaces.d/eth0

Step 3:  Add the following text into nano. Change the address, network, netmask and gateway to match your network. If necessary, change eth0 to the name of your network interface.

allow-hotplug eth0
iface eth0 inet static
address 10.0.0.220
network 10.0.0.0
netmask 255.255.255.0
gateway 10.0.0.1

Step 4: Reboot to apply the changes:

sudo reboot

Your Raspberry Pi will restart and be accessible on the new IP address


Was this article helpful? Yes No

Please tell us how we can improve this article:

Submit
Created 30/10/2023 | Last Updated: 30/10/2023

Related Expansion Boards

Related Articles

Raspberry Pi GPIO Pin Usage
Raspberry Pi GPIO Pin mapping and connections
PCB Header Assembly Jig
Using the PCB Header Assembly Jig
Samba Setup on Raspberry Pi
How to install and setup Samba on the Raspberry Pi
Set a static IP Address on Raspberry Pi OS Bookworm
How to use a static network IP Address on the Raspberry Pi
Set a static IP Address on Raspberry Pi OS Buster
How to use a static network IP Address on the Raspberry Pi
Set a static IP Address on Raspberry Pi OS Wheezy
Static Network IP Address Setup on the Raspberry Pi
I2C Part 1 - Introducing I2C
An introduction to the I²C protocol
I2C Part 2 - Enabling I2C on the Raspberry Pi
How to enable I2C on the Raspberry Pi
I2C Part 3 - I2C tools in Linux
An introduction to I²C tools in Linux
I2C Part 4 - Programming I2C with Python
How to get started with Programming I²C with Python
SPI and Python on Raspberry Pi OS
Enabling SPI on the Raspberry Pi and installing python py-spidev
Using Pythonpath with the Python Libraries
Adding the library path to startup
Connecting Expansion Boards to the Raspberry Pi 400
Expanding the Potential of Your Raspberry Pi 400