Skip to content

Instantly share code, notes, and snippets.

@morad7
Created March 21, 2016 11:42
Show Gist options
  • Save morad7/8478ea7779145173ffbc to your computer and use it in GitHub Desktop.
Save morad7/8478ea7779145173ffbc to your computer and use it in GitHub Desktop.
Ubuntu set static IP
To assign a static IP you need to edit /etc/network/interfaces.
The interface will probably be called eth0.
The current entry will look something like
auto eth0
iface eth0 inet dhcp
You will need you need to change this to:
auto eth0
iface eth0 inet static
address 10.253.0.50
netmask 255.255.255.0
network 10.253.0.0
gateway 10.253.0.1
dns-nameservers 8.8.8.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment