Next: Useful targets, Previous: Installing a package, Up: Getting started [Contents]
If you want to use the newly installed package by default you will
need to modify the relevant variables in your environment, such as
PATH, LD_LIBRARY_PATH, INFOPATH, etc. These
variables inform your system of the locations of relevant files on
it. For example, PATH contains a list of all directories that
contain executable files.
There is a sample script setup.sh in the top-level source directory which can be used to set the main environment variables.
$ source setup.sh
Note that you need to load this file into the current shell with the
source command, instead of executing it (which would only apply
the definitions temporarily in a subshell).
After loading this file, your environment variables should include the target directory so you can run the new packages directly:
$ echo $PATH /gnu/bin:/usr/local/bin:/usr/bin:/bin $ which hello /gnu/bin/hello
If you want to restore your original environment variables they are
saved in the variables ORIG_PATH, ORIG_LD_LIBRARY_PATH,
etc.
$ PATH=$ORIG_PATH $ LD_LIBRARY_PATH=$ORIG_LD_LIBRARY_PATH