Created
December 23, 2023 18:56
-
-
Save levid0s/ff2c62130eca0d2495d5441d820b95ee to your computer and use it in GitHub Desktop.
Raspberry Pi Set Static IP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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