Run Python Scripts from know folder from anywhere in linux

Viewed 60

I need to run python scripts from anywhere on my Linux pc.

I have a folder name Tools that hold 100 Scripts and I wonder if there is any way to just write the name of the script in the terminal without having to move to the specific folder.

2 Answers

You could add that folder to your $PATH variable:

export PATH=${PATH}:/Tools

If you place this statement in a file that's executed when you open a shell (e.g., .bashrc if you use bash), you won't need to manually run it again.

Related