Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
sir , when i enter ifconfig , my red hat server 5 states an error.... bash:ifconfig command not found ....I have tried updatedb ....ran ifconfig from /sbin/ifconfig ....ran as root ...
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Location
    Mumbai
    Posts
    4

    Talking Pls help me : tried all still ifconfig not working

    sir ,

    when i enter ifconfig , my red hat server 5 states an error....

    bash:ifconfig command not found


    ....I have tried updatedb
    ....ran ifconfig from /sbin/ifconfig
    ....ran as root user


    although it shows in /sbin

    but still doesnt runs from there..


    Hoping for a quick and positive response......

    ..nIRAj..

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    can you show exact output in terminal when you execute the command?
    btw, when you say red hat 5, do you mean RHEL5?

  3. #3
    Linux Newbie ursusca's Avatar
    Join Date
    Dec 2008
    Location
    Toronto
    Posts
    112
    Hi,

    Code:
    ifconfig
    command you can run under root user only. If you want to switch to root user from usual user try

    Code:
    $ su - 
    Password:

  4. #4
    Just Joined!
    Join Date
    Jan 2008
    Location
    Mumbai
    Posts
    4
    thanks for ur reply

    but i have tried under root user too,

    still showing command not found.

  5. #5
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,281
    Quote Originally Posted by neverforgetniraj View Post
    thanks for ur reply

    but i have tried under root user too,

    still showing command not found.

    Please give us some output as folows:

    Code:
    Fri Oct 16 17:37:29] [root] /
    
    ~ $ locate ifconfig
    /usr/share/fish/completions/ifconfig.fish
    /usr/share/man/fr/man8/ifconfig.8.gz
    /usr/share/man/de/man8/ifconfig.8.gz
    /usr/share/man/man8/ifconfig.8.gz
    /usr/share/man/pt/man8/ifconfig.8.gz
    /usr/share/zsh/4.2.0/functions/_ifconfig
    /sbin/ifconfig
    
    [Fri Oct 16 17:37:19] [root] /
    
    ~ $ ifconfig
    bash: ifconfig: command not found
    
    [Fri Oct 16 17:37:23] [root] /
    
    ~ $ /sbin/ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:11:D8:95:65:7D
              inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:16007947 errors:0 dropped:0 overruns:0 frame:0
              TX packets:11998359 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:2187767098 (2.0 GiB)  TX bytes:1894897314 (1.7 GiB)
              Interrupt:185 Memory:fac00000-0
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:36814 errors:0 dropped:0 overruns:0 frame:0
              TX packets:36814 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:6352889 (6.0 MiB)  TX bytes:6352889 (6.0 MiB)
    The above is using sudo so it is correct.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  6. #6
    Linux Guru waterhead's Avatar
    Join Date
    Jul 2004
    Location
    Franklin, Wisconsin
    Posts
    4,577
    Try using the entire path to the command.
    Code:
    $ /sbin/ifconfig
    It may be in a different folder than /sbin.

    Don't cd to the folder, just include it in the command.
    Paul

    Please do not send Private Messages to me with requests for help. I will not reply.

  7. #7
    Linux Newbie ursusca's Avatar
    Join Date
    Dec 2008
    Location
    Toronto
    Posts
    112
    You didn't ask on qestion:

    Quote Originally Posted by coopstah13 View Post
    ...when you say red hat 5, do you mean RHEL5?
    So what is your system?

    Code:
    uname -a

  8. #8
    Just Joined!
    Join Date
    Jan 2008
    Location
    Mumbai
    Posts
    4
    /sbin/ifconfig working fine


    then why not "ifconfig"

  9. #9
    oz
    oz is online now
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,099
    /sbin/ifconfig working fine


    then why not "ifconfig"
    Welcome to the forums!

    It's a path issue under Fedora, but this wiki page explains it all and how to fix it:

    Features/SbinSanity - FedoraProject
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  10. #10
    Linux Newbie ursusca's Avatar
    Join Date
    Dec 2008
    Location
    Toronto
    Posts
    112
    Have a look at my example:
    I ran terminal in Gnome desktop environment om my Linux CentOS 5.3
    Under regular user:
    Code:
    $ ifconfig
    bash: ifconfig: command not found
     /sbin/ifconfig
    eth0      Link encap:Ethernet ......
    Under root user:
    Code:
    $ su
    Password: 
    [root@bearcentos mike]# ifconfig
    bash: ifconfig: command not found
    but
    Code:
    $ su - 
    Password: 
    [root@bearcentos ~]# ifconfig
    eth0      Link encap:Ethernet .....
    How do you log on under root user?

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...