Python scripts in /usr/bin

后端 未结 5 567
野的像风
野的像风 2021-02-04 04:07

I\'m writing a pretty basic application in python (it\'s only one file at the moment). My question is how do I get it so the python script is able to be run in /usr/bin without

5条回答
  •  南旧
    南旧 (楼主)
    2021-02-04 04:16

    add #!/usr/bin/env python to the very top of htswap.py and rename htswap.py to htswap then do a command: chmod +x htswap to make htswap executable.

提交回复
热议问题