22 February, 2008

Static (manual) IP set up on Linux in CLI (short version)

by Morten Holmensen

If you want to manual set up an IP address in Linux,
it could be one of ways to set this up.

open terminal window, probely you should be a root or "sudo" to do this,


Adding static IP and netmask
  • sudo ifconfig ethX 123.45.67.89 netmask 255.255.255.0
  • echo nameserver 123.45.67.89 >> /etc/resolv.conf


Adding Gateway
 
  • sudo route add default gw 172.16.236.0


----------------------------------->

No comments: