LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-02-2013, 08:09 AM   #1
imran shaikh2
LQ Newbie
 
Registered: Jun 2013
Posts: 10

Rep: Reputation: Disabled
Edit command for Gateway Route Logged in as root


hi
can you please hlp with the command to edit
gateway ip
I`ve added gateway ip address with
route default add gw 192.168.xxx.xxx
now I want to edit and make changes please help
 
Old 07-02-2013, 08:13 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
Which distro do you have?
Code:
cat /etc/*release*
 
Old 07-02-2013, 08:13 AM   #3
imran shaikh2
LQ Newbie
 
Registered: Jun 2013
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
Which distro do you have?
Code:
cat /etc/*release*
]



unbuntu 12.04
 
Old 07-02-2013, 09:48 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,954

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
Quote:
Originally Posted by imran shaikh2 View Post
hi
can you please hlp with the command to edit gateway ip
I`ve added gateway ip address with route default add gw 192.168.xxx.xxx now I want to edit and make changes please help
Ok...so you already know the command; where is the problem?? Read the man page on the route command.

Delete the gateway you put in previously with a "route del" command, then add the new default gateway command in with the command you first ran.
 
Old 07-02-2013, 10:08 AM   #5
mddnix
Member
 
Registered: Mar 2013
Location: Bangalore, India
Distribution: Redhat, Arch, Ubuntu
Posts: 512

Rep: Reputation: 139Reputation: 139
First remove old default gateway
Code:
# route del default gw 192.168.old.old <interface>
Then, add new gateway
Code:
# route add default gw 192.168.new.new <interface>
Finally, check
Code:
# route
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using route command with a non root process seepatplay Linux - Newbie 1 09-15-2010 09:52 PM
What is the command to delte EVERYTHING when you are logged into root? Ricapar Mandriva 5 05-02-2004 07:53 PM
i installed a MINIMAL installation of RH8, i logged as root, but no startx command... kublador Linux - Software 8 09-17-2003 06:50 AM
i installed a MINIMAL installation of RH8, i logged as root, but no startx command... kublador Linux - Software 2 09-17-2003 12:31 AM
mozilla works fine when logged in as a user but crashes when logged in as root jimi Linux - General 6 04-02-2003 09:34 PM


All times are GMT -5. The time now is 09:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration