command not found - Printable Version +- Linux-Noob Forums (https://www.linux-noob.com/forums) +-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html) +--- Forum: Tips and Tricks (https://www.linux-noob.com/forums/forum-59.html) +--- Thread: command not found (/thread-3562.html) |
command not found - anyweb - 2004-03-10 have you ever seen this in Redhat or Fedora ? Code: [root@localhost anyweb]# ifconfig the reason... even though you are logged in as root, is because of the WAY you logged in. let's look at the way i logged in by seeing the whole picture... Code: [anyweb@localhost anyweb]$ su i logged in to root by using su, now that does make me root, but it doesnt give me root's path to all the lovely things root normally has access to..... which explains the errors above. So, to get root and roots path simply do like this Code: [anyweb@localhost anyweb]$ su - notice now, that ifconfig WORKS. while we are here, look at the first bit of code again, when i logged in as su (without the DASH) root was labelled as Code: [root@localhost anyweb]# but after logging in as su - root is now labelled as Code: [root@localhost root]# see the difference ? for more info.. about why this happens have a look at this live chat on IRC i had... Quote:<anyweb> is the su - phenonemon only common to redhat/fedora or all linux ? as in command not found when su versus su ---- TH0R sets channel limit to 200 command not found - godskalk - 2004-11-06 You can also do this instead of logging in as root: Code: /sbin/ifconfig command not found - anyweb - 2004-11-06 yup but the idea of this topic, is to explain to da noobs why they are getting 'command not found' while logged in as root :) cheers anyweb command not found - danZenie - 2004-11-25 from the command prompt: Code: danZenie@localhost># echo "alias su='su -'">>~/.bashrc this will do if you're a bash user. and most likely if you're on a fedora or RH box then you are a bash user. no more worries about su and su -. |