Difference between revisions of "Assign an IP Address on a Linux Computer"
m (importing article from wikihow) |
m (Text replacement - "<br><br>" to "") |
||
Line 13: | Line 13: | ||
#Scroll down until you find your network interface card in the file (usually named eth0 for an ethernet connection, or wlan0 or wifi0 for a wifi connection). | #Scroll down until you find your network interface card in the file (usually named eth0 for an ethernet connection, or wlan0 or wifi0 for a wifi connection). | ||
#Change 'iface eth0 inet dhcp' to 'iface eth0 inet static' | #Change 'iface eth0 inet dhcp' to 'iface eth0 inet static' | ||
− | #Add the following lines, substituting the IP address numbers with your desired configuration: | + | #Add the following lines, substituting the IP address numbers with your desired configuration:<br>address 192.168.0.10<br>netmask 255.255.255.0<br>network 192.168.0.0<br>broadcast 192.168.0.255<br>gateway 192.168.0.1<br>dns-nameservers 216.10.119.241<br> |
#Save and exit from the file by pressing Escape (to enter vi command mode), then ":wq" and Enter | #Save and exit from the file by pressing Escape (to enter vi command mode), then ":wq" and Enter | ||
#Type 'ifdown eth0' and press enter. | #Type 'ifdown eth0' and press enter. |