7

I'm new to Linux so sorry if this is a very basic question.

I know you type the following to install something, you type these three commands:

./configure
make
sudo make install

I know . means the current directory. So does ./configure mean run the program configure in the current directory? If so, why can't you just type configure?

1 Answers1

8

Only directories listed in $PATH are searched for commands to execute. The current directory is never included in $PATH as a security precaution, hence you have to specify it explicitly.

  • 3
    Sadly never is not true. But it should never be the first in the path. OP: consider this. I create an evil program that deletes all files I have access to. I call that script ls or something else which is sounds innocent and what you are likely to type. If your path first searches the current directory and you type that command then you have an unexpected problem. – Hennes Jul 05 '13 at 03:37