LinuxQuestions.org
Visit Jeremy's Blog.
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 03-05-2004, 12:49 AM   #1
MHouse
LQ Newbie
 
Registered: Mar 2004
Posts: 17

Rep: Reputation: 0
finding gateway address on eth0


alert...

I tried using the command "more /etc/sysconfig/network" to find the gateway address that is assigned to my nic, but that doesn't seem to work consistently across systems. Some have it configured, some don't... Anyway, i really need to figure out the gateway address bound to my NIC, and I'm really tired of searching online, so I thought I would sign up here and just ask.

I'm a Linux n00b, and a formerly devoted Microsoft fan that is trying to give something new a shot (again). I've tried various distros off and on the last few years, and I just came to the conclusion that Linux hates me. I can set up and secure an Active Directory domain with no problem, but I have trouble even changing the screen resolution in Linux...
 
Old 03-05-2004, 01:15 AM   #2
FatalSystmError
LQ Newbie
 
Registered: Mar 2004
Location: Ontario Canada
Distribution: Fedora Core 3
Posts: 15

Rep: Reputation: 0
TraceRoute should do the trick ... SystemTools > Traceroute
 
Old 03-05-2004, 01:24 AM   #3
lozz1978
Member
 
Registered: Jan 2004
Location: Sunny UK
Distribution: Slackware 9.1
Posts: 53

Rep: Reputation: 15
cant you find the gateway in sbin/ifconfig ?

not t my box at the mo, so not 100%
 
Old 03-05-2004, 01:27 AM   #4
MHouse
LQ Newbie
 
Registered: Mar 2004
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by FatalSystmError
TraceRoute should do the trick ... SystemTools > Traceroute
Thanks for the reply, but it's not quite what I'm looking for... I actually need a user that is logging onto a machine via telnet to find the gateway address via the command line. It's part of a lab assignment that I'm having to prove out myself before I can assign it to the students. Any ideas?
 
Old 03-05-2004, 01:28 AM   #5
MHouse
LQ Newbie
 
Registered: Mar 2004
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by lozz1978
cant you find the gateway in sbin/ifconfig ?

not t my box at the mo, so not 100%
I tried an "ifconfig eth0" command, but I didn't see anything listed there. That was my first instinct, being used to "ipconfig /all" on 2K/XP...
 
Old 03-05-2004, 01:32 AM   #6
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
try "/sbin/route"
 
Old 03-05-2004, 01:47 AM   #7
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
to change resolution simply type
xf86config
if your using xfree86 for the GUI (most popualr choice in linux)

screen resolution change is no fun, actualy for me i have to tell it what resolution to use if i want to start up the GUI

and if what your not looking for is not in "route", then i fear you may never find it
 
Old 03-05-2004, 02:05 AM   #8
MHouse
LQ Newbie
 
Registered: Mar 2004
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by SciYro
to change resolution simply type
xf86config
if your using xfree86 for the GUI (most popualr choice in linux)

screen resolution change is no fun, actualy for me i have to tell it what resolution to use if i want to start up the GUI

and if what your not looking for is not in "route", then i fear you may never find it
Awesome! You guys rock. That did just what I needed! I'll try tackling screen resolution at a later date. I managed to get it set to what I needed to during setup, so I'm happy for now.

Thanks for the warm welcome! You may see me here often... If I can be converted to a Linux user, there is hope for anyone.
 
Old 03-05-2004, 02:07 AM   #9
MHouse
LQ Newbie
 
Registered: Mar 2004
Posts: 17

Original Poster
Rep: Reputation: 0
Another quick question without starting a new thread... Why isn't /sbin in the path variable by default? It seems like you want easy access to all of those utilities just anytime without having to type in a path... I know that you can add it, but there are so many thing that I don't understand why they are done the way they are...

edit: and why are some things in /usr/sbin instead? I mean, what makes route go in /sbin while traceroute goes in /usr/sbin?

Last edited by MHouse; 03-05-2004 at 02:11 AM.
 
Old 03-05-2004, 06:35 AM   #10
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
ok / is only on 1 partion (the root partion), and linux only mounts the root partion, meaning that programs on other partions wont work, so by default the / partion has everything a working distro needs to boot and mount and handle simple system tasks that may be required at boot time, however sence some people like to spilt program up, the /usr directory comes in handy, its basicly a copy of the / partion , only its in a difrent directory to organize needed, from not so needed, /usr/local is the same, this one is use for most user installed program to help keep the system clean

/sbin is like / bin only by default its supoed to be restricted so only super users can use the program in /sbin

if /sbin aint in your path then is say add it, not like you can use it anyways (unless your a super user), reasons why it might not be in the path by default : the distro is trying to be idiot resistant
 
  


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
how do i find my gateway address on eth0? seth Linux - Networking 10 03-21-2010 03:42 AM
Finding Ip address with Mac address rupeshdwivedi Linux - Networking 6 09-01-2005 07:44 AM
How do I set the ip address for eth0, eth1 and the default gateway? abefroman SUSE / openSUSE 5 05-19-2005 04:15 AM
What is Gateway address and what is Network address? abefroman Linux - Networking 1 03-17-2004 08:25 PM
Should i use the eth0 ip address of my internet ip address when applying iptables ForumKid Linux - Security 2 01-03-2002 08:54 AM

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

All times are GMT -5. The time now is 04:18 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