Show Me How To Change The Default Gateway Linux Shell Command

Forums » Linux Hosting » Show Me How To Change The Default Gateway Linux Shell Command
need help to please show me what is the command i need for changing the default gateway on my server. i have a linux server and i can only access with the shell
Does anyone know how to change my default gateway in the command link in the linux shell? need help to please show me what is the command i need for changing the default gateway on my server. i have a linux server and i can only access with the shell so i need to have the command, im sure its something simple, but please send it to me

Thanks
wallpaperama
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.
oorangeboy
worked like a charm thanks.
tebza
i want to change a default gateway on my linux client, what should i type in the command shell?
snehal
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"
hoavn
thanks you very much. it's useful with me.
wallpaperama
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
sharid
please sir i am sharid from india, how can i change my network gateway through command
Nagaraj
pls send it
maruf
14-303-red-roses-photo.jpg|2822
please send my linux related information every day
Josh
great! see the below url also

basilvarghese.co.cc/linux-networkin
Anupa
route -n The address contained in the last line (with the UG flag) is the address for your default gateway
Ghobar
Hi how to seat automatic gateway in linux ?
Title: Show Me How To Change The Default Gateway Linux Shell Command [382]
Tags: change default gateway linux command