AvoidErrors
  • HOME
  • WINDOWS
  • APPLE
  • MS OFFICE
  • RASPBERRY PI
  • WORDPRESS
  • TECH TIPS
  • LINUX
  • VIRTUALIZATION
  • FORUM
No Result
View All Result
AvoidErrors
No Result
View All Result

Assign a Static IP Address to The Raspberry Pi

Miguel by Miguel
June 1, 2016 - Updated on March 29, 2022
in Raspberry pi
0
Share on FacebookShare on Reddit
RECOMMENDED: Improve PC performance Migrate to Solid State Drive (SSD)

This tutorial will show you how to assign your Raspberry Pi a static IP address using the latest version of Raspbian. This tutorial assumes that you have installed the latest Raspbian / NOOBS Operating System.

This guide also assumes that you’ve connected your Pi to the network via Ethernet.

Video Tutorial:

Assign a Static IP Address to The Raspberry Pi

If you are running a recent Raspbian /etc/network/interfaces should look like the image below. If you have changed it PUT IT BACK.

Assign-a-Static-IP-to-The-Raspberry-Pi-3-3

Gather Information

First we need to obtain the “IP address” from our Pi. Have a pen and paper ready! . . .

From the Terminal or SSH run the following command:

ifconfig

Assign-a-Static-IP-to-The-Raspberry-Pi-3

This reveals your PI’s network information, the bit you need is after eth0. Make a note of your current IP address. This is represented as follows:

inet addr: 10.0.0.39 (Pi’s Current IP Address)

We need a little more information before we proceed. enter the command:

netstat -nr

Assign-a-Static-IP-to-The-Raspberry-Pi-3-2

We need:

Gateway Address – 10.0.0.1

Editing Network Configuration

We now need to plug this information into the Pi’s DHCP configuration file using a text editor.

sudo nano /etc/dhcpcd.conf

Assign-a-Static-IP-to-The-Raspberry-Pi-3-4

On the very top of the file type in the following lines:

interface eth0
static ip_address=10.0.0.XX/24
static routers=10.0.0.1
static domain_name_servers=10.0.0.1

Save the file by pressing Ctrl plus X, then Y for Yes, and Enter on the keyboard.

Reboot the Raspberry pi:

sudo reboot

Now you should have a static IP address assigned to the PI.

Previous Post

How to Upgrade and Migrate Your Laptop’s Hard Drive to an SSD

Next Post

Reset Notepad to default settings on Windows 10

Miguel

Miguel

I started this tech blog back in 2011 as a place to write down processes I took to fix my client systems and network. Now I write some tips and tricks to help others with the tech issues that one might encounter.

Related Posts

How to Install Raspberry Pi Raspbian OS on a PC
Raspberry pi

How to Install Raspberry Pi Raspbian OS on a PC

by Miguel
April 29, 2022 - Updated on May 2, 2022
Remote Desktop Raspberry PI from Windows
Raspberry pi

Remote Desktop Raspberry PI from Windows

by Miguel
April 15, 2022 - Updated on April 16, 2022

Subscribe to get weekly tutorials direct to your inbox!

Windows

Fix .net Framework 3.5 Missing on Windows 11

by Rhousse
August 13, 2022
Clean Install Windows 11 Without USB
Windows

How to turn off Delivery Optimization on Windows 11

by Muhammad Imran Habib
August 13, 2022
How to Enable Dark Mode on Windows 11
Windows

How to Prevent Users from Changing Proxy Settings in Windows 11

by Muhammad Imran Habib
August 13, 2022
How to Check Laptop Battery Details in Windows 10
Windows

How to Create a New Custom Power Plan in Windows 11

by Muhammad Imran Habib
August 13, 2022
  • Disclaimer & Privacy Policy
  • FAQ
© 2022 Powered by Cloudways
No Result
View All Result
  • HOME
  • WINDOWS
  • APPLE
  • MS OFFICE
  • RASPBERRY PI
  • WORDPRESS
  • TECH TIPS
  • LINUX
  • VIRTUALIZATION
  • FORUM

© 2022 AvoidErrors Powered by Cloudways | Privacy

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.