Skip to content

Instantly share code, notes, and snippets.

@wrightrocket
Created March 19, 2018 01:11
Show Gist options
  • Save wrightrocket/d4e06a65f38e24191d89b379d43729e1 to your computer and use it in GitHub Desktop.
Save wrightrocket/d4e06a65f38e24191d89b379d43729e1 to your computer and use it in GitHub Desktop.
Static and dhcp for ubuntu
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.121.97
netmask 255.255.255.0
gateway 192.168.121.1
dns-nameservers 10.0.0.23 10.0.0.5 4.2.2.2
dns-search now.test
#iface eth0 inet dhcp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment