LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Fedora command prompt problem (http://www.linuxquestions.org/questions/linux-newbie-8/fedora-command-prompt-problem-207762/)

ylkien 07-21-2004 05:18 AM

Fedora command prompt problem
 
Hi,

i just installed fedora. i tried the command "ifconfig" under root, but it doesn't work. It only works when i am in the "/sbin" folder. What could be the cause of this problem?

I tired the command "service", but it was no where to be found. Did i forget to install something?

Thanks.

Goala 07-21-2004 05:51 AM

you have to add the /sbin to your PATH variable. When you run a command the system searchs for that file in the path indicated in your PATH variable. If it doesn't exist in these directories you get a "command not found" error.

You can see the PATH value:
echo $PATH

Put a line such this into the root $HOME/.profile (or $HOME/.bash_profile?) file (or you can edit the line where PATH is established).

PATH=$PATH:/sbin

bye.

Joubert79 07-21-2004 08:53 AM

Indeed, /sbin needs to be in roots path. If you're getting to root by changing user with "su" (rather than logging in) then this wont change any environment variables, like $PATH, from the current users. /sbin is usually not in a users path, and nor should it be really. Try "su -" to get a login shell as root and thus obtain root environment variables.


All times are GMT -5. The time now is 04:03 AM.