Get IP address, gateway details, change gateway over Linux Machine

To get the IP address on a ubuntu machine we use the command:
$ ifconfig


To get the gateway details, we use the command:
$ route -n


To change the gatway, we use the following commands
$ sudo  route del default
$ sudo route add default gw <new-gateway-address>


Cheers.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply