I've got a folder: /root/Desktop/commands/
This folder contains many Python scripts that should be callable from anywhere from the terminal. How can I make it, that I say once, that all scripts in this folder should be executable (without the "python" prefix of course)?
All I know is, that you have to put the file with a shebang and without the file-ending into /usr/bin/ and make it executable (chmod +x FILENAME)
In Windows, for example, you can easily put the path (f.e. c:/User/Desktop/commands/) into the environment variables (-> "PATH"). Then you can add the file extension (-> "PATHEXT") and from now on, the file (f.e. myscript.py) is callable from everywhere trough the terminal, even without the "python" prefix and the ".py" ending.
Thanks for every answer,
(and yeah: stay healthy :))
bash: /my/path/mycommand: Permission denied
– CMinusMinus Mar 17 '20 at 12:22chmod +x
on those files? – Panki Mar 17 '20 at 12:23#!/usr/bin/env python
and set these files executable withchmod +x filename
. As described here. – BlueManCZ Mar 17 '20 at 12:25