|
Home > Archive > Red Hat Topics > January 2006 > ipconfig problems
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Bob Erdmann 2006-01-17, 5:47 pm |
| In learning Linux, I've been going thru both "Running Linux", and "Linux in
a Nutshell", plus the book "Fedora Core 4 Unleashed". So far I've had much
success in setting up and configuring Linux. For the last two days I've
been stumped. I started experimenting with the 'ifconfig' command to check
the current configuration status of my Ethernet interface card (NIC), and
have hit a brick wall.
When I type 'ifconfig' (without the quotes) either by itself or with
arguments, I get the following response:
-bash: ifconfig: command not found
I can be logged in under my named account, or as 'su', it seems to make no
difference. Additionally, I can be sitting in the /sbin directory where
ifconfig is located, and still get the same results. This happens either
when I boot to a command line (runlevel 3) or in GNOME or KDE - Nothing
seems to matter. None of the books I have treat 'ifconfig' any differently
than the other commands I've tried so far with great success. I've googled
& yahoo'd the problem but to no avail. I probably can't see the forest for
the trees (I'm just too close to it), or I'm doing something wrong, but I'll
be darned if I can figure out what. Does anyone have any idea what the
problem might be?
Thanks,
/Bob
| |
| pavlos 2006-01-17, 5:47 pm |
| Try this,
bob>su - (dont forget the minus sign)
#>ifconfig
HTH
Bob Erdmann wrote:
> In learning Linux, I've been going thru both "Running Linux", and "Linux in
> a Nutshell", plus the book "Fedora Core 4 Unleashed". So far I've had much
> success in setting up and configuring Linux. For the last two days I've
> been stumped. I started experimenting with the 'ifconfig' command to check
> the current configuration status of my Ethernet interface card (NIC), and
> have hit a brick wall.
>
> When I type 'ifconfig' (without the quotes) either by itself or with
> arguments, I get the following response:
>
> -bash: ifconfig: command not found
>
> I can be logged in under my named account, or as 'su', it seems to make no
> difference. Additionally, I can be sitting in the /sbin directory where
> ifconfig is located, and still get the same results. This happens either
> when I boot to a command line (runlevel 3) or in GNOME or KDE - Nothing
> seems to matter. None of the books I have treat 'ifconfig' any differently
> than the other commands I've tried so far with great success. I've googled
> & yahoo'd the problem but to no avail. I probably can't see the forest for
> the trees (I'm just too close to it), or I'm doing something wrong, but I'll
> be darned if I can figure out what. Does anyone have any idea what the
> problem might be?
>
> Thanks,
>
> /Bob
>
>
| |
| Ed Hurst 2006-01-17, 5:47 pm |
| Bob Erdmann wrote:
> In learning Linux, I've been going thru both "Running Linux", and "Linux in
> a Nutshell", plus the book "Fedora Core 4 Unleashed". So far I've had much
> success in setting up and configuring Linux.
Good for you! I'm impressed with your seriousness.
> & yahoo'd the problem but to no avail. I probably can't see the forest for
> the trees (I'm just too close to it), or I'm doing something wrong, but I'll
> be darned if I can figure out what. Does anyone have any idea what the
> problem might be?
Short answer: it's not in your path.
Long answer: You can either add /sbin to your path (not really a good
idea) or you can create an alias in your ~/.bashrc
alias ifconfig="/sbin/ifconfig"
Ed Hurst
------------
return addy is spam trap
try je hurst at gmail dot com
| |
| Bob Erdmann 2006-01-17, 5:47 pm |
| Wow! ... It worked! Guess I'll go back to the books to see what the minus
sign does and what the difference is between logging on as su with and
without it. I've not run into that before.
Thanks - much appreciated.
/Bob
"pavlos" <kairis@cox.net> wrote in message
news:lL6zf.9132$ZA5.3194@fed1read05...[vbcol=seagreen]
> Try this,
>
> bob>su - (dont forget the minus sign)
>
> #>ifconfig
>
>
> HTH
>
>
> Bob Erdmann wrote:
>
in[vbcol=seagreen]
much[vbcol=seagreen]
check[vbcol=seagreen]
and[vbcol=seagreen]
no[vbcol=seagreen]
either[vbcol=seagreen]
differently[vbcol=seagreen]
googled[vbcol=seagreen]
for[vbcol=seagreen]
I'll[vbcol=seagreen]
| |
| Bob Erdmann 2006-01-17, 5:47 pm |
| Thanks, Ed - That was the problem. I think I'll spend the day studying
environments, paths, aliases, etc. :-) Probably time well spent, I
suspect.
/Bob (feeling like a dummy)
"Ed Hurst" <me@privacy.net> wrote in message
news:FU6zf.10043$H71.5594@newssvr13.news.prodigy.com...
> Bob Erdmann wrote:
in[vbcol=seagreen]
much[vbcol=seagreen]
>
> Good for you! I'm impressed with your seriousness.
>
for[vbcol=seagreen]
I'll[vbcol=seagreen]
>
> Short answer: it's not in your path.
>
> Long answer: You can either add /sbin to your path (not really a good
> idea) or you can create an alias in your ~/.bashrc
>
> alias ifconfig="/sbin/ifconfig"
>
> Ed Hurst
> ------------
> return addy is spam trap
> try je hurst at gmail dot com
| |
| Lenard 2006-01-17, 5:47 pm |
| Bob Erdmann wrote:
> Wow! ... It worked! Guess I'll go back to the books to see what the minus
> sign does and what the difference is between logging on as su with and
> without it. I've not run into that before.
Using 'su' inherits the (current) user's pathing ($PATH) while using 'su -'
inherits root's pathing. Try the command $PATH both ways and see for
yourself.
FYI: this is covered in the manpage for su, from the console or xterm
session type; man su
--
"A personal computer is called a personal computer because it's yours,
Anything that runs on that computer, you should have control over."
Andrew Moss, Microsoft's senior director of technical policy, 2005
| |
| decrepit 2006-01-18, 7:47 am |
| Bob Erdmann wrote:
> /Bob (feeling like a dummy)
Don't put yourself down Bob, I'm in a very similar situation, and think
I'm coping quite well. This problem puzzled me for a long time, the
books say use a certain command, and when I try it nothing happens. Then
one day, I think it may have been on this forum, somebody wrote the
command with "/sbin/ in front of it, ie # /sbin/ifconfig
There's a few of these I've found so far, and none of my books mentions
this!!!! I thought initialy the program wasn't on the computer.
Mike
| |
| Jean-David Beyer 2006-01-18, 7:47 am |
| decrepit > wrote:
> Bob Erdmann wrote:
>
>
> Don't put yourself down Bob, I'm in a very similar situation, and think
> I'm coping quite well. This problem puzzled me for a long time, the
> books say use a certain command, and when I try it nothing happens. Then
> one day, I think it may have been on this forum, somebody wrote the
> command with "/sbin/ in front of it, ie # /sbin/ifconfig
> There's a few of these I've found so far, and none of my books mentions
> this!!!! I thought initialy the program wasn't on the computer.
> Mike
I suppose those book authors have /sbin in their PATH. I specifically do not
as I do not want to run one of those by accident, especially when I have
root permissions.
--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 07:10:00 up 19 days, 21:57, 6 users, load average: 4.13, 4.20, 4.18
| |
| Ed Hurst 2006-01-18, 7:47 am |
| decrepit > wrote:
> Don't put yourself down Bob, I'm in a very similar situation, and think
> I'm coping quite well. This problem puzzled me for a long time, the
> books say use a certain command, and when I try it nothing happens. Then
> one day, I think it may have been on this forum, somebody wrote the
> command with "/sbin/ in front of it, ie # /sbin/ifconfig
> There's a few of these I've found so far, and none of my books mentions
> this!!!! I thought initialy the program wasn't on the computer.
Ditto what this and the one from Jean-David says. Please note, on my
CentOS system, if the command is there somewhere, even not in my path,
the *locate* command always finds it.
--
Ed Hurst
------------
return addy is spam trap
try je hurst at gmail dot com
| |
| decrepit 2006-01-18, 7:47 am |
| Ed Hurst wrote:
>Please note, on my
> CentOS system, if the command is there somewhere, even not in my path,
> the *locate* command always finds it.
>
Thanks Ed, just tried it, and it works, very quick!!!
| |
| Scott Lurndal 2006-01-18, 5:48 pm |
| Ed Hurst <me@privacy.net> writes:
>decrepit > wrote:
>
>
>Ditto what this and the one from Jean-David says. Please note, on my
>CentOS system, if the command is there somewhere, even not in my path,
>the *locate* command always finds it.
Not _always_, of course as the following should also be considered:
1) the slocate database can be turned off (e.g. see /etc/updatedb.conf,
particularly the "DAILY_UPDATE" line, which defaults to OFF in
CentOS 4.2)
2) The slocate database is only updated once daily. Any changes to the
filesystem since the most recent update will not be shown by the
locate command (a root user can force an update with the updatedb command).
3) The set of filesystems that is indexed by slocate is configurable
(again, in /etc/updatedb.conf).
scott
| |
| Ed Hurst 2006-01-21, 2:46 am |
| Scott Lurndal wrote:
> Not _always_, of course as the following should also be considered:
>
> 1) the slocate database can be turned off (e.g. see /etc/updatedb.conf,
> particularly the "DAILY_UPDATE" line, which defaults to OFF in
> CentOS 4.2)
>
> 2) The slocate database is only updated once daily. Any changes to the
> filesystem since the most recent update will not be shown by the
> locate command (a root user can force an update with the updatedb command).
>
> 3) The set of filesystems that is indexed by slocate is configurable
> (again, in /etc/updatedb.conf).
How about that; learn something new every day. Thanks, Scott. During a
fresh install, I run *updatedb* manually several times, so I never gave
it a thought.
--
Ed Hurst
------------
return addy is spam trap
try je hurst at gmail dot com
|
|
|
|
|