Pages

Setting path (How to do it)

Setting path is one of the most encountered problem for a beginner in Linux. Setting path is very simple.

To see what are present in the current path, type

echo $PATH
echo $LD_LIBRARY_PATH

To list these as a list

echo "${PATH//:/$'\n'}"
echo "${LD_LIBRARY_PATH//:/$'\n'}"

Now, come to our aim.

Go the the directory, where your directory is.
Type pwd to print the current working directory.

Now insert following line in .bashrc (or .profile) file

export PATH=$PATH:/path/to/dir

then
source ~/.bashrc





No comments:

Post a Comment