There are two default paths you have available where you can put your programs. They are:
/usr/local/bin
and
~/bin
The second of the two is a bin
directory just below your home (i.e. /home/yourid/bin
.
You would have to create it:
$ mkdir ~/bin
After it's created, the directory will automatically be included in your path on your next login.
You could either copy
your programs to one of those two locations, or apply a symbolic link
of your applicatons to one of those locations.
This is an example of placing a symbolic link:
$ ln -s /home/myPython/colors.py ~/bin/colors.py
Now you would have colors.py
in your path and you can call it from anywhere. Using this procedure you could have your program packages any multiple directories. But the ones that you want to have readily available will be in your path by the symbolic
link.
Alternatively as you asked, you can add a directory to your search path with this command:
$ export PATH=$PATH:/home/myPython
If you want this path to be effective on each boot append that line it to your ~/.bashrc
file.
share
link just below your question and have a direct link to easily find this thread. When you log on, you'll also get a notice of messages , comments, and answers addressed to you in the heading of the page. – L. D. James Oct 08 '16 at 19:27