If I want to launch a script (let's say in the home directory I have a file called hi.py) I need to specify the full path: python /home/user/hi.py. But when I want to use mkdir I can simply say: mkdir folder_name. How can I do the same thing whit hi.py?


The application/script:

  1. needs to be in one of the directories in PATH (according to FHS you should use /usr/local/bin)

  2. needs to be executable and, if it is an interpreted script, have a shebang (e.g. #!/bin/sh for shell scripts, #!/usr/bin/env python2 for python scripts).

Not the answer you're looking for? Browse other questions tagged or ask your own question.