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
?
Asked
Active
Viewed 96 times
1

user284659
- 328
1 Answers
0
The application/script:
needs to be in one of the directories in PATH (according to FHS you should use
/usr/local/bin
)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).

muru
- 197,895
- 55
- 485
- 740

CameronNemo
- 1,675
./hi.py
? – Seth Nov 23 '14 at 18:45