Click to See Complete Forum and Search --> : bash: ifconfig: command not found


Ectropian
06-04-2001, 04:47 PM
bash: ifconfig: command not found
bash: route: command not found

Things such as lilo work fine.

Fresh install of RH 7.1 logged into KDE as a user, terminal su root. where did my commands go and how do i get them back? :(

Strike
06-04-2001, 04:53 PM
Instead of su use su -. Either that or check in /usr/sbin and /sbin everytime you get that "command not found" rror :)

Ectropian
06-04-2001, 04:58 PM
Muchos Gracious..

Freeky how 'su root' gave me access to some things, but wouldn't put me INTO root like 'su - root'

Guess you learn something new every day :)

btw.. I've tried Debian, love the functionality of the apt-get, but i'm not huge on command line. RH 7.1 hit the spot straight out of the box :) New KDE rules too. :)

Strike
06-04-2001, 05:00 PM
btw, that is su followed by a space and a dash

Ectropian
06-04-2001, 05:01 PM
!!ALERT!! Excessive use of Smiley faces..hehe

Craig McPherson
06-04-2001, 05:06 PM
It's all a matter of PATH statements.

When you "su root", the root shell you spawn keeps your normal user's environement, including PATH. You probably don't have your user's PATH to include /sbin and /usr/sbin, where programs like ifconfig reside. Thus, you can't access programs in those directories just by typing the name of the command -- you have to specify the full path (/sbin/ifconfig)

If you use "su - root", the shell is set up as if root had actually logged in -- which means you get root's environment and root's PATH.

I put /sbin and /usr/sbin in EVERYBODY's path, so it doesn't make much difference to me.