Linux Tips and Tricks

A collection of tips, tricks and everything linux

Using route , set your default gateway

without comments

Want to quickly set the route for your machine from the terminal.

Start by opening up a terminal window, and type the following, just make sure you have the ip address of your gateway to do so. In this case the gateway of 10.3.156.1 is being used.

route add default gw 10.3.156.1 eth0

We can see our changes by typing

route -n

Written by mnk0

October 24th, 2008 at 11:02 am

Posted in networking, shell

Leave a Reply

You must be logged in to post a comment.