I'm installing a software using the following

wget <URL package.tar.gz>
tar xzvf package.tar.gr
./configure package
cd package
make install

My problem is that the package is not installed in the working directory. Where is it installed by default? Where should I add details about the place I want to install my files?

1 Answer 1


To install to a custom directory, use this:

./configure --prefix=/desired/path
sudo make install

By default, programs installed without the added prefix will be located in /usr/local/bin. To verify this, you can type which program_name after installation.

If you install your program in a custom directory, it will be installed in /desired/path/bin. You will then need to make sure that the directory is included in your PATH environment variable. If it is not, which program_name will not work, nor will you be able to start the program without including the path or being in the same directory.

To do that, you can add the following line to your ~/.profile:

export PATH=$PATH:/desired/path/bin

Once the change is made, you can type source ~/.profile to update the variable, or log into a new shell for the change to take effect.

  • 1
    It is more likely that you need export PATH=$PATH:/desired/path/bin, since most configures will default prefix to /usr/local and assume that /usr/local/bin is in the PATH.
    – grochmal
    Jul 12, 2016 at 1:26
  • You're right, @grochmal. I've edited my answer to account for this. Thanks.
    – clk
    Jul 12, 2016 at 1:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .