Chrzanek Chrzanek - 1 year ago 81
Linux Question

How to execute python scirpt in Linux?

I would like to make a python script that would do some work with interfaces file in Linux.

How I may make this script executable in Linux? I would to open it with

and it would do some commands in terminal.

ht_ ht_
Answer Source

Make callable

chmod u+x <filename here>

first line in file with shebang to determine how the script should be executed:


execute with

./<filename here>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download