

How to give your Raspberry Pi a Static IP Address - UPDATE– The Pi Hut
source link: https://thepihut.com/blogs/raspberry-pi-tutorials/how-to-give-your-raspberry-pi-a-static-ip-address-update
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

How to give your Raspberry Pi a Static IP Address - UPDATE

This tutorial will show you how to set a static IP address on your Pi with the release of Raspbian Jessie. At the time of writing, the latest release date of Raspbian Jessie is 18-03-2016 with Kernal version 4.1.
I recommend doing this on a fresh install, however if you have attempted to set a static IP address already, you may have found yourself editing the interfaces file (/etc/network/interfaces). I hope you made a backup, because you’ll need to remove any edits you have made, and revert it back to its original state!
The following is done over SSH, but you could just as well plug your Pi into a monitor, hook up a keyboard and mouse, and use the Terminal instead.
Start by editing the dhcpcd.conf file
sudo nano /etc/dhcpcd.conf
Scroll all the way to the bottom of the file and add one, or both of the following snippets. Depending on whether you want to set a static IP address for a wired connection or a wireless connection eth0 = wired, wlan0 = wireless.
You’ll need to edit the numbers in the snippet so they match your network configuration.
interface eth0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
interface wlan0
static ip_address=192.168.0.200/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
interface = This defines which network interface you are setting the configuration for.
static ip_address = This is the IP address that you want to set your device to. (Make sure you leave the /24 at the end)
static routers = This is the IP address of your gateway (probably the IP address or your router)
static domain_name_servers = This is the IP address of your DNS (probably the IP address of your router). You can add multiple IP addresses here separated with a single space.
To exit the editor, press ctrl+x
To save your changes press the letter “Y” then hit enter
Now all you need to do is reboot, and everything should be set!
reboot
You can double check by typing
ifconfig
And checking the interfaces IP address
Recommend
-
10
Bill Clinton to Give A Keynote Address At Ripple Tech Conference Ripple News ...
-
7
How to configure static IP address on RHEL 8Question: How can I configure a static IP address on RHEL 8 / CentOS 8?. This guide will show you different ways of configuring a static IP address on RHEL...
-
13
Set up a static IP address on Ubuntu 18.04 LTS server ...
-
8
How To Configure Static IP Address on Ubuntu 20.04/18.04/19.10In today’s guide, we are going to see how to configure a static IP address on Ubuntu server 18.04/19.04. After installing Ubuntu 18.04/19.04 Server or Desktop, the default setting...
-
5
How Do I Set a Static IP Address on Raspberry Pi? By Phil King Updated 13 hours ago
-
5
How to Configure Static IP Address on Ubuntu 22.04 LTS By Fatih Küçükkarakurt Published 9 hours ago ...
-
6
Assigning a static IP address to a phones hotspot ...
-
3
6 Reasons Why You Should Give Your Smart Home Its Own Email Address By Adrian Nita Published 13 hours ago See so...
-
5
March 2, 2023 /
-
11
Set a static IP address with nmtui on Raspberry Pi OS 12 'Bookworm' Ma...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK