Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
1) how can i know the gateway of the interface from command line , when i try ifconfig -a , it show the ip address and mask but not the gateway.
is there any command i can use to show the gateway of my interface ??
2) how to configure my routing table to be saved even after i restart the system , every time i restart i need to use "route add " command to modify my routing table , is there any files i can use or edit to make my routing table permenant ??
To see your default gateway, simply type "route" or "route -n" if you want to see just the numbers.
Right now I do not have access to my redhat server, so I am going to have to guess where the best place would be to put a startup command. However I think I put mine in /etc/rc.d/network or something similar. You can add your route add default gw line at the end of it, or another similar file.
okay thanks alot , i will try it , but if you got the exact place to put the route please tell me
by the wat i put the commands in an excutable file and put it in /etc/rc.d/rc5.d and name it as S75route
so when i log on it run , but i guess i should find a file that i can add routes as a text .
Ok. Just FYI - Scripts in /etc/rc.d/rc5.d only run when you go into graphical mode.
The 5 stands for run level 5, or graphical interface. You may also want to add it to the folder for run level 3 which is the standard command line only run level.
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.