LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 11-17-2006, 07:07 PM   #1
rhle4rb
LQ Newbie
 
Registered: Nov 2006
Posts: 2

Rep: Reputation: 0
How do I find out what my IP Address?


Can anyonw tell me how can I find what my RHLE4 workstation IP address? I tried going to terminal type IFCONFIG but telling the command is not know. I am able to get to the internet both external and internal.

Thanks for any suggestion.
 
Old 11-17-2006, 07:08 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
/sbin/ifconfig (if you are root, this should be in your $PATH).

--- rod.
 
Old 11-20-2006, 09:29 AM   #3
jgeiger
LQ Newbie
 
Registered: Aug 2006
Location: Nebraska
Distribution: RHEL 4, CentOS 4, Fedora 4&5
Posts: 5

Rep: Reputation: 0
Code:
ip addr
Also works.
 
Old 07-16-2007, 04:48 AM   #4
kvaibhav
LQ Newbie
 
Registered: Dec 2005
Posts: 4

Rep: Reputation: 0
Post /sbin in $PATH

As it happened in my case, /sbin was not in my PATH.
(I am a simple user on a network. Not an administrator.)
Hence, neither ifconfig, nor ip addr worked.

I had to locate the command ifconfig,
i.e.,
Code:
locate ifconfig
Edit the file $HOME/.bashrc, i.e.,
add the line export PATH=$PATH:/sbin to
file $HOME/.bashrc

Source the .bashrc, i.e. run the command

Code:
. $HOME/.bashrc
and then I could avail both the commands.

In any case, the following script, mentioned on page
http://www.linuxquestions.org/questi...?postid=815946

runs without problems, and without hassle.

Code:
/sbin/ifconfig eth0|grep inet|awk {'print $2'}|cut -d":" -f2
-Cheers!
 
Old 07-18-2007, 09:20 AM   #5
doublejoon
Member
 
Registered: Oct 2003
Location: King George, VA
Distribution: RHEL/CentOS/Scientific/Fedora, LinuxMint
Posts: 370

Rep: Reputation: 44
Just type

Code:
su -
 
Old 07-27-2007, 04:33 AM   #6
brianmcgee
Member
 
Registered: Jun 2007
Location: Munich, Germany
Distribution: RHEL, CentOS, Fedora, SLES (...)
Posts: 399

Rep: Reputation: 40
Well, just for viewing the ip addess there is no need for special super user rights...
 
Old 07-27-2007, 07:57 AM   #7
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
The question being addressed was not one of rights as much as expedient access. On Linuxes that I use, '/sbin' is in the $PATH for root, but not mortal users. I made the point originally because newbies might not realize that 'ifconfig' as root will probably work, but as joesixpack would require '/sbin/ifconfig'. Just trying to head off the reply reporting 'command not found'.
--- rod.
 
Old 07-31-2007, 08:06 AM   #8
satnam888
LQ Newbie
 
Registered: Jul 2007
Location: Coventry, UK
Distribution: Red Hat AS 2.1
Posts: 11

Rep: Reputation: 0
try

host xxxxxxxx

where xxxxxxxx is your hostname
 
  


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
how to find physical address of kernel virtual address kushneeraj Programming 0 10-20-2006 07:29 PM
How to find an IP address from the MAC address of a remote machine ? jitz Linux - General 3 01-03-2006 07:55 AM
How to find IP address of a machine if I know their MAC Address dysenteryduke Linux - Networking 13 09-12-2005 10:21 AM
How to find MAC address of a specified IP address ? longtongfish Programming 1 07-12-2005 03:26 PM
How do I find my IP address?? Rosmo Linux - Networking 7 10-29-2004 03:55 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 07:43 AM.

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