Tag Archives: command

IP Modification Through Command Line

Published by:

Here is the way to change or modification ip address through command line. Do all the command in root privileged.

To set a static ip

#ip addr add 192.168.xxx.xxx dev eth0

to delete a static ip

#ip addr del 192.168.xxx.xxx dev eth0

to set dynamic ip

#dhclient eth0

to set route for static ip

#route add default gw xxx.xxx.xxx.xxx

to clear all ip setting

#ip addr flush dev eth0