LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 06-30-2009, 11:17 PM   #1
an_sush
Member
 
Registered: Nov 2008
Posts: 46

Rep: Reputation: 15
Find IP of a linux box


I have installed RHL5 on my laptop and i move around my office. so my IP changes frequently. Whats the way to find the current ip?
I tried ifconfig but it gave command not found. I also tried with root user but the command isn't recognized. I opened /sbin/ifconfig file but the file is non readable format.
Is there some other place/way to find the current IP of the box?
 
Old 06-30-2009, 11:27 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
It should definitely work as root. If you happen to not have
/sbin in your $PATH (e.g. you did a 'su' rather than a 'su -')
for root it still should work with the full path ...
/sbin/ifconfig


Cheers,
Tink
 
Old 06-30-2009, 11:42 PM   #3
an_sush
Member
 
Registered: Nov 2008
Posts: 46

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Tinkster View Post
It should definitely work as root. If you happen to not have
/sbin in your $PATH (e.g. you did a 'su' rather than a 'su -')
for root it still should work with the full path ...
/sbin/ifconfig


Cheers,
Tink
No luck...i tried su - still it doesnt recognize ifconfig. /sbin is present in $PATH of root also.
 
Old 06-30-2009, 11:47 PM   #4
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
So, when you type as root in a terminal

/sbin/ifconfig

what error message is produced?
Is /sbin/ifconfig executable? Check with

ls -l /sbin/ifconfig
 
Old 07-01-2009, 12:17 AM   #5
an_sush
Member
 
Registered: Nov 2008
Posts: 46

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Uncle_Theodore View Post
So, when you type as root in a terminal

/sbin/ifconfig

what error message is produced?
Is /sbin/ifconfig executable? Check with

ls -l /sbin/ifconfig
Code:
. /sbin/ifocnfig
-bash: ELF :command not found
ls -l /sbin/ifconfig
-rwxr-xr-x l ...
so it has executable permissions
 
Old 07-01-2009, 12:23 AM   #6
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
Why is there a dot before /sbin/ifconfig? Do NOT source the file, execute it. Type just

/sbin/ifconfig

with nothing else.
 
  


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 to find the unallocated Harddisks in a linux Box athreyavc Linux - Hardware 1 01-12-2007 10:08 PM
How do I find out what's using the memory on a Linux box karlovac Linux - General 12 07-28-2006 04:06 PM
find linux box by name vs. IP zchoyt Linux - Networking 6 08-15-2005 11:24 PM
How to find a name of Linux box! ardi76 Linux - Software 4 08-28-2003 04:07 PM
windows cant find linux box manthram Linux - Networking 4 04-01-2002 12:30 AM


All times are GMT -5. The time now is 08:03 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration