Problem: I'm trying to teach myself Python. The Python tutorial I'm using at byteofpyton.org says, in order to execute a python program that I write from any directory within the CLI, I need to edit the "PATH environment variable". That is, if I want to run my Python programs without first cd'ing to the dir in which the programs exist, I need to set up the "PATH environment variable".
/home/user/myscripts/mytest.py
./mytest.py
-sh: mytest.py: not found
echo $PATH
export PATH=/home/user/myscripts
export PATH=$PATH:/home/user/myscripts
export PATH=/usr/bin:/bin:/home/user/myscripts
cat >> $HOME/.profile PATH=$PATH:/home/user/myscripts export PATH Ctrl-D