Wallpapers Forums Login

Change Default Gateway Linux Command

Does anyone know how to change my default gateway in the command link in the linux shell?

Thanks
Ghobar Thu Feb 10, 2011
Hi
how to seat automatic gateway in linux ?
Suman Mon Jan 24, 2011
Thanks for the this

Cheers!!!!!!!!!
Anupa Wed Jun 30, 2010
route -n

The address contained in the last line (with the UG flag) is the address for your default gateway
Josh Thu Sep 17, 2009
great! see the below url also

basilvarghese.co.cc/linux-networkin
maruf Mon Sep 14, 2009
14-303-red-roses-photo.jpg|2822
please send my linux related information every day
Nagaraj Tue Aug 25, 2009
pls send it
sharid Tue Apr 07, 2009
please sir i am sharid from india, how can i change my network gateway through command
wallpaperama Mon Mar 30, 2009
30p-303-linux-default-gateway.gif
if you have fedora or redhat or centos you can just send this command and select network from the list, there you can change the default gateway too.

the command to get the utility as in my pictures is this:

LINUX SHELL COMMAND:
setup


hope the image helps
hoavn Thu Nov 27, 2008
thanks you very much. it's useful with me.
snehal Fri Jul 11, 2008
u can even try.

route add default gw 192.168.0.1

replace 192.168.0.1 with your ip, to delete route replace "add" with "delete"
tebza Fri May 23, 2008
i want to change a default gateway on my linux client, what should i type in the command shell?
oorangeboy Fri Aug 03, 2007
worked like a charm thanks.
hostman Thu Aug 24, 2006
If you want to chage the default gateway in linux using the linux shell, do this:

Execute this comand to display your network configuration:
CODE:
cat /etc/sysconfig/network


It will show something like this:
CODE:
NETWORKING=yes
HOSTNAME=host.domain.com
GATEWAY=210.96.156.101


In this example, my gateway is set to 210.96.156.101 If you want to change it, user your favorite editor and edit, then save it. I like using nano or VI. if you find vi hard to master, use nano, its much easier to use. if you are going to us nano, execute this command to edit:

CODE:
nano /etc/sysconfig/network


Please note in this example i am using Redhat/Fedora distribution.

Related Content

Information

Share

wallpaperama | Wallpapers | Forums | Terms Of Service

copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Mon May 06, 2013 (-8 GMT)
Powered by: Webune Forums V5