Networking Forums

Networking Forums > Computer Networking > Linux Networking > howto check ip address in shell without using ifconfig?

Reply
Thread Tools Display Modes

howto check ip address in shell without using ifconfig?

 
 
Yinghe Chen
Guest
Posts: n/a

 
      08-22-2007, 06:36 PM
Hi gurus,

I got a question, suppose I don't have ifconfig command in my shell, is
there a way that i can check my ip address?

I don't know somehow my ifconfig just doesn't work, it is VM RHEL.

Thanks,


 
Reply With Quote
 
 
 
 
Jack Snodgrass
Guest
Posts: n/a

 
      08-22-2007, 07:40 PM
On Wed, 22 Aug 2007 20:36:25 +0200, Yinghe Chen wrote:

> Hi gurus,
>
> I got a question, suppose I don't have ifconfig command in my shell, is
> there a way that i can check my ip address?
>
> I don't know somehow my ifconfig just doesn't work, it is VM RHEL.
>
> Thanks,


did you try
/sbin/ifconfig
.... maybe /sbin is not in your shell's path.

jack



--
D.A.M. - Mothers Against Dyslexia

see http://www.jacksnodgrass.com for my contact info.

jack - Grapevine/Richardson
 
Reply With Quote
 
Kalyan Manchikanti
Guest
Posts: n/a

 
      08-23-2007, 12:37 AM
On Aug 22, 11:36 am, "Yinghe Chen" <yinghe.c...@jeppesen.com.rm>
wrote:
> Hi gurus,
>
> I got a question, suppose I don't have ifconfig command in my shell, is
> there a way that i can check my ip address?
>
> I don't know somehow my ifconfig just doesn't work, it is VM RHEL.
>
> Thanks,



getent hosts <hostname>

 
Reply With Quote
 
Floyd L. Davidson
Guest
Posts: n/a

 
      08-23-2007, 04:34 AM
"Yinghe Chen" <(E-Mail Removed)> wrote:
>Hi gurus,
>
>I got a question, suppose I don't have ifconfig command in my shell, is
>there a way that i can check my ip address?
>
>I don't know somehow my ifconfig just doesn't work, it is VM RHEL.


Set the PATH variable for you shell. That is a common
problem for shell scripts executed by cron, for example.
In this case ifconfig is in /usr/sbin, and that is not
likely to be in any user's PATH that is automatically
generated.

--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) (E-Mail Removed)
 
Reply With Quote
 
Yinghe Chen
Guest
Posts: n/a

 
      08-23-2007, 07:41 AM
yeah, it is correct, the /sbin/ is not in my shell's path, I added and it
works fine now.

Thank you all,

"Jack Snodgrass" <(E-Mail Removed)> wrote in message
news:Ti0zi.5916$ni6.3548@trnddc03...
> On Wed, 22 Aug 2007 20:36:25 +0200, Yinghe Chen wrote:
>
>> Hi gurus,
>>
>> I got a question, suppose I don't have ifconfig command in my shell, is
>> there a way that i can check my ip address?
>>
>> I don't know somehow my ifconfig just doesn't work, it is VM RHEL.
>>
>> Thanks,

>
> did you try
> /sbin/ifconfig
> ... maybe /sbin is not in your shell's path.
>
> jack
>
>
>
> --
> D.A.M. - Mothers Against Dyslexia
>
> see http://www.jacksnodgrass.com for my contact info.
>
> jack - Grapevine/Richardson



 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop ifconfig from adding an ipv6 address? Brad Linux Networking 4 02-28-2008 11:48 PM
request for "/sbin/ifconfig -a" output (discover MAC Address) Nathan Thompson Linux Networking 5 08-29-2005 08:46 AM
Howto set an IP address range into rules of iptables Terry Ho Linux Networking 2 08-25-2003 10:03 AM
IP address not set with ifconfig on Mandrake 9.1 boot in VMware 4.0 Phil Holland Linux Networking 2 07-27-2003 10:09 PM
Win9x Howto get the Media Access Control (MAC) address ? Manu Windows Networking 1 07-08-2003 11:26 PM



1 2 3 4 5 6 7 8 9 10 11