Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ok I must have messed something up but I'm getting a lot of 'command not found' errors going on. I think, somehow, a file got messed up which lists common paths (or whatever the term is)
Can someone tell me the file that should be edited &/or the basic lines that should be in it?
Example:
I can't run 'ifconfig', 'telinit', 'useradd', etc. They all give me 'command not found', but I'm sure I have those commands.
Originally posted by christer Ok I must have messed something up but I'm getting a lot of 'command not found' errors going on. I think, somehow, a file got messed up which lists common paths (or whatever the term is)
Can someone tell me the file that should be edited &/or the basic lines that should be in it?
Example:
I can't run 'ifconfig', 'telinit', 'useradd', etc. They all give me 'command not found', but I'm sure I have those commands.
Are you logged in as root ? What OS are you using ?
I happened to have the very same problem when I started using linux. Actually the default path for root and user seem to be different. Try 'echo $PATH' when you login as root and when you login as normal user, and compare the two. You can't seem to use it even though you su to root user, you must login as root in the first place. So try 'export PATH=blablabla:/usr/local/sbin:/usr/sbin:/sbin'. The blablabla part is your normal path when you echo $PATH. The point here is to add those sbin things. You can also add the path to .bashrc file in your home directory. Other way, if you are too lazy like I am to bother about export or .bashrc I just /sbin/useradd; /sbin/telinit
I get 'command not found' if I'm logged in as root or not. It seems, for some reason, that my /sur/sbin & /sbin directories are not being checked. I'll check that .bashrc file to see if those paths are in there but this has gotten annoying.
What does that change? That changes the root path?
For some reason in Red Hat 9 , just typing su root password gives you an ordinary users PATH whereas typing su - "dash" root password gives you a typical Root users PATH including directories such as /sbin - it might be su "dash" that you need - you can check out both versions with echo $PATH - the PATHS are quite different - one typical of an ordinary user and one typical of a proper Root user.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.