LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 07: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, 07:13 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Which distro do you have?
Code:
cat /etc/*release*
 
Old 07-02-2013, 07: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, 08:48 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,656

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
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, 09:08 AM   #5
Madhu Desai
Member
 
Registered: Mar 2013
Distribution: Rocky, Fedora, Ubuntu
Posts: 541

Rep: Reputation: 153Reputation: 153
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



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 08:52 PM
What is the command to delte EVERYTHING when you are logged into root? Ricapar Mandriva 5 05-02-2004 06:53 PM
i installed a MINIMAL installation of RH8, i logged as root, but no startx command... kublador Linux - Software 8 09-17-2003 05:50 AM
i installed a MINIMAL installation of RH8, i logged as root, but no startx command... kublador Linux - Software 2 09-16-2003 11:31 PM
mozilla works fine when logged in as a user but crashes when logged in as root jimi Linux - General 6 04-02-2003 08:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:13 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
Open Source Consulting | Domain Registration