-   Linux - Newbie (
-   -   Fedora command prompt problem (

ylkien 07-21-2004 04:18 AM

Fedora command prompt problem

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?


Goala 07-21-2004 04: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).



Joubert79 07-21-2004 07: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 03:57 AM.