Skip to content

Instantly share code, notes, and snippets.

@levid0s
Created December 23, 2023 18:56
Show Gist options
  • Save levid0s/ff2c62130eca0d2495d5441d820b95ee to your computer and use it in GitHub Desktop.
Save levid0s/ff2c62130eca0d2495d5441d820b95ee to your computer and use it in GitHub Desktop.
Raspberry Pi Set Static IP
# No DHCP Server
vim /etc/network/interfaces.d/eth0-static.conf
auto eth0
iface eth0 inet static
address 22.100.0.2
gateway 22.100.0.1
netmask 24
+ reboot
# Have DHCP Server on the network
vim /etc/dhcpcd.conf
interface eth0
static ip_address=192.168.1.2/24
static routers=192.168.1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment