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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
'Which', for example. I used 'urpmi' to install it a few weeks ago, and used it several times successfully. Today, however, (logged in as root) when I used the command "which foo" I received the response:
"bash: which: command not found" yet "man which" has an entry and when I run "urpmi which" I receive the response
"Everything already installed"
sometimes that will happen if you type the command as a different user. The problem is that different users have different paths, so sometimes linux does not know "where" to find a command depending upon the path
That is all well and good, but to run urpmi one has to be root, so when it was installed it would have been with root as owner. As to the path, one must assume that urmpi (the mandrake version of rpm) would install the program in a directory that is in the path!
Unfortunately, packages get installed where the creator of the package designates them, not into the path of the installer. So just installing it with urpmi, kpackage, rpm, yast2, portage, apt-get, or any other type of package manager doesn't mean it will be in your path. It just means its installed. So it's completely possible that it's not in your path at all. If a program is installed, and you can't run it, almost invariably you will find it is an issue with where the program is, not it's stability. Additionally, roots' path is not the same as other users' paths. Just because root can see it, doesn't mean everyone else can too. In fact the opposite is usually true because root is the trusted superuser and can run software that no other user should.
then type "locate which"
this will give you the path of the which program
after this, as root (either login as root or do a "su -" (note the hyphen, it's very important)) do a "echo $PATH" and see if the paths match ie:
# locate which
# echo $PATH
This indicates that "which" is in my $PATH, though it may not be in yours.