Last active
December 17, 2015 21:29
-
-
Save hjc/5674764 to your computer and use it in GitHub Desktop.
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
# On Virtual Box? | |
# Ensure your networking type is bridged interface or this will fail | |
sudo vim /etc/network/interfaces | |
# comment (#) out all lines that are there and add this to the bottom (however, replace | |
# the * in the address with whatever you want the static IP to be, e.g., my goal is a | |
# static IP of: 192.168.1.140, so the address line should be: address 192.168.1.140): | |
auto lo eth0 | |
iface lo inet loopback | |
iface eth0 inet static | |
# this value should be whatever you want the end static IP to be. | |
address 192.168.1.* | |
netmask 255.255.255.0 | |
gateway 192.168.1.1 | |
# save file | |
sudo vim /etc/resolvconf/resolv.conf.d/base | |
# comment (#) out all lines that are there and add this to the bottom: | |
nameserver 8.8.8.8 | |
nameserver 8.8.4.4 | |
# save file | |
sudo /etc/init.d/networking restart | |
# ifconfig to check it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment