Difference between revisions of "Assign an IP Address on a Linux Computer"

Kipkis (Kipkis | contribs)
m (importing article from wikihow)
 
Kipkis (Kipkis | contribs)
m (Text replacement - "[[Category:L" to "[[Category: L")
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Linux is the free, open-source alternative to Microsoft Windows and Mac OS X.  The operating system itself can be chopped down entirely to a raw text console, or it can utilize a desktop environment such as Gnome or KDE.  This guide will explain how to assign an IP address on a Linux system through the use of a text console.  This guide assumes that you know a little bit about Linux, and you know how networks, IP addresses, and DNS servers work.
 
Linux is the free, open-source alternative to Microsoft Windows and Mac OS X.  The operating system itself can be chopped down entirely to a raw text console, or it can utilize a desktop environment such as Gnome or KDE.  This guide will explain how to assign an IP address on a Linux system through the use of a text console.  This guide assumes that you know a little bit about Linux, and you know how networks, IP addresses, and DNS servers work.
  
[[Category:Linux]]
+
[[Category: Linux]]
  
 
== Steps ==
 
== Steps ==
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:<br><br><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>
+
#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.