Does anyone know how to change my default gateway in the command link in the linux shell?
Thanks
Change Default Gateway Linux Command
Change Default Gateway Linux Command
Change Default Gateway Linux Command
Post Description:
Post Tags: change, default, gateway, linux, command
This Post Has Been Viewed 15034 Times Since Thu Aug 24, 2006 5:53 pm Posted By hostman with 3 replies
Post Description:
Post Tags: change, default, gateway, linux, command
This Post Has Been Viewed 15034 Times Since Thu Aug 24, 2006 5:53 pm Posted By hostman with 3 replies
| Change Default Gateway Linux Command |
Leave Your Comments [ dejar commentarios ]
Comments and replies About Change Default Gateway Linux Command
:: 1 :: #95 - Reply By hostman On Thu Aug 24, 2006 6:02 pm
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:
It will show something like this:
Code:
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:
Please note in this example i am using Redhat/Fedora distribution.
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
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.
:: 2 :: #13881 - Reply By oorangeboy On Fri Aug 03, 2007 8:20 am
worked like a charm thanks.
:: 3 :: #54851 - Reply By tebza On Fri May 23, 2008 3:21 am
i want to change a default gateway on my linux client, what should i type in the command shell?

