Unix Technical Forum

How to determine local ip address?

This is a discussion on How to determine local ip address? within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> I've tried using ifconfig but I have no access to ROOT user. Another way? Thanks, Jaisol...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-24-2008, 06:07 AM
jaisol
 
Posts: n/a
Default How to determine local ip address?

I've tried using ifconfig but I have no access to ROOT user.

Another way?

Thanks,
Jaisol
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-24-2008, 06:07 AM
John K. Herreshoff
 
Posts: n/a
Default Re: How to determine local ip address?

jaisol wrote:

> I've tried using ifconfig but I have no access to ROOT user.
>
> Another way?
>
> Thanks,
> Jaisol


Try /sbin/ifconfig

That should do it.

John.

--
Using the Gray Box
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-24-2008, 06:07 AM
Jack McCue
 
Posts: n/a
Default Re: How to determine local ip address?

jaisol <jaisol@gmail.com> wrote:
> I've tried using ifconfig but I have no access to ROOT user.
>
> Another way?

as someone else said /sbin/ifconfig will work, but for
another way: grep IPADDR /etc/dhcpc/dhcpcd-eth0.info
>
> Thanks,
> Jaisol


Jack

--
To announce that there must be no criticism of the president,
or that we are to stand by the president, right or wrong, is
not only unpatriotic and servile, but is morally treasonable
to the American public. -- Theodore Roosevelt
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-24-2008, 06:07 AM
Dan C
 
Posts: n/a
Default Re: How to determine local ip address?

On Thu, 22 May 2008 17:07:24 -0500, Jack McCue wrote:

> as someone else said /sbin/ifconfig will work, but for
> another way: grep IPADDR /etc/dhcpc/dhcpcd-eth0.info


That way makes a BIG assumption that the machine is using DHCP to get it's
IP address... Wont' work on a machine configured for a static IP (like
all of mine, for example).


--
"Ubuntu" -- an African word, meaning "Slackware is too hard for me".
Now filtering out all posts originating from Google Groups.
The Usenet Improvement Project: http://improve-usenet.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-24-2008, 06:07 AM
D Herring
 
Posts: n/a
Default Re: How to determine local ip address?

jaisol wrote:
> I've tried using ifconfig but I have no access to ROOT user.


So far we have /sbin/ifconfig and /etc/dhcpc/dhcpcd-eth0.info.

Here are some other places to look
- /etc/hosts
- x=`uname -n`; ping $x
- `netstat --inet`
- /proc/net/tcp (note the byte order may not be what you expect)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 05-24-2008, 06:07 AM
Henrik Carlqvist
 
Posts: n/a
Default Re: How to determine local ip address?

D Herring <dherring@at.tentpost.dot.com> wrote:
> - x=`uname -n`; ping $x


Or even more simple:

ping `uname -n`

regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc3(at)poolhem.se Examples of addresses which go to spammers:
root@localhost postmaster@localhost

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 05-24-2008, 06:07 AM
goarilla@work
 
Posts: n/a
Default Re: How to determine local ip address?

Henrik Carlqvist wrote:
> D Herring <dherring@at.tentpost.dot.com> wrote:
>> - x=`uname -n`; ping $x

>
> Or even more simple:
>
> ping `uname -n`
>
> regards Henrik

huh wouldn't that just ping the loopback interface ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 05-24-2008, 06:07 AM
Helmut Hullen
 
Posts: n/a
Default Re: How to determine local ip address?

Hallo, jaisol,

Du meintest am 22.05.08:

> I've tried using ifconfig but I have no access to ROOT user.


> Another way?


Do you mean that IP address which is shown to users from outside?

Try

lynx myip.dk

or

lynx myip.nl

Or do you mean the IP address which is used in the LAN?

Viele Gruesse
Helmut

"Ubuntu" - an African word, meaning "Slackware is too hard for me".

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 05-24-2008, 06:07 AM
Beej Jorgensen
 
Posts: n/a
Default Re: How to determine local ip address?

D Herring <dherring@at.tentpost.dot.com> wrote:
>Here are some other places to look


Here's another one, albeit less "standard":

$ resolveip -s `hostname`
192.168.1.2

resolveip is a util packaged with mysql; never heard of it until now.

-Beej

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 05-24-2008, 06:07 AM
Helmut Hullen
 
Posts: n/a
Default Re: How to determine local ip address?

Hallo, Beej,

Du meintest am 23.05.08:

> Here's another one, albeit less "standard":


> $ resolveip -s `hostname`
> 192.168.1.2


> resolveip is a util packaged with mysql; never heard of it until now.


Very nice!

Viele Gruesse
Helmut

"Ubuntu" - an African word, meaning "Slackware is too hard for me".

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:21 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com