Linux custom executable globally available

前端 未结 2 1622
滥情空心
滥情空心 2020-12-23 16:53

I downloaded the Google App Engine as a zip format, unzipped it to /usr/local/google_engine

Now I need to run a python script from that folder all the time. How do I

2条回答
  •  再見小時候
    2020-12-23 17:21

    There are two ways to do this. As Kal mentioned above you can add the folder to the path variable by adding

    export PATH=/usr/local/google_app_engine/bin:$PATH1 
    

    to your .bashrc. Alternatively, if the command is just one script you can move or copy it to /usr/bin. This will make it accessible as a command from anywhere.

    If you want to create a command to do this without moving script.py then you can create a bash file that calls it with a fixed path then put that in /usr/bin

提交回复
热议问题