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 101 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/shfor shell scripts,#!/usr/bin/env python2for python scripts).
muru
- 207,228
CameronNemo
- 1,675