What the line #!/usr/bin/python does? [duplicate]





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0
















This question already has an answer here:




  • Why does Python in Linux require the line #!/usr/bin/python?

    8 answers




Im learning python but I dont understand what this line does? or how many options there is?










share|improve this question













marked as duplicate by PerlDuck, Rinzwind, PRATAP, Kulfy, user68186 Mar 21 at 16:13


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

























    0
















    This question already has an answer here:




    • Why does Python in Linux require the line #!/usr/bin/python?

      8 answers




    Im learning python but I dont understand what this line does? or how many options there is?










    share|improve this question













    marked as duplicate by PerlDuck, Rinzwind, PRATAP, Kulfy, user68186 Mar 21 at 16:13


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





















      0












      0








      0


      0







      This question already has an answer here:




      • Why does Python in Linux require the line #!/usr/bin/python?

        8 answers




      Im learning python but I dont understand what this line does? or how many options there is?










      share|improve this question















      This question already has an answer here:




      • Why does Python in Linux require the line #!/usr/bin/python?

        8 answers




      Im learning python but I dont understand what this line does? or how many options there is?





      This question already has an answer here:




      • Why does Python in Linux require the line #!/usr/bin/python?

        8 answers








      python programming






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 21 at 15:57









      Mr.CaringiMr.Caringi

      33




      33




      marked as duplicate by PerlDuck, Rinzwind, PRATAP, Kulfy, user68186 Mar 21 at 16:13


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









      marked as duplicate by PerlDuck, Rinzwind, PRATAP, Kulfy, user68186 Mar 21 at 16:13


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
























          1 Answer
          1






          active

          oldest

          votes


















          1














          This line is called a shebang and it tells the kernel which interpreter to use on the script.



          For example, if a script is named with the path path/to/script, and it starts with the line #!/bin/sh, then the program loader is instructed to run the program /bin/sh, passing path/to/script as the first argument.



          In your instance, the kernel will use whatever /usr/bin/python points to (I think it is by default python3.6).






          share|improve this answer


























          • thank you very much! gracias!

            – Mr.Caringi
            Mar 21 at 16:13











          • /usr/bin/python should be Python 2.7. This is per PEP 394, which says the command python should be Python 2.

            – wjandrea
            Mar 21 at 16:18













          • @wjandrea Thanks for this :D " end users should be aware that python refers to python3 on at least Arch Linux" I failed to read past python3 when I was searching around for the default

            – j-money
            Mar 21 at 21:28


















          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          This line is called a shebang and it tells the kernel which interpreter to use on the script.



          For example, if a script is named with the path path/to/script, and it starts with the line #!/bin/sh, then the program loader is instructed to run the program /bin/sh, passing path/to/script as the first argument.



          In your instance, the kernel will use whatever /usr/bin/python points to (I think it is by default python3.6).






          share|improve this answer


























          • thank you very much! gracias!

            – Mr.Caringi
            Mar 21 at 16:13











          • /usr/bin/python should be Python 2.7. This is per PEP 394, which says the command python should be Python 2.

            – wjandrea
            Mar 21 at 16:18













          • @wjandrea Thanks for this :D " end users should be aware that python refers to python3 on at least Arch Linux" I failed to read past python3 when I was searching around for the default

            – j-money
            Mar 21 at 21:28
















          1














          This line is called a shebang and it tells the kernel which interpreter to use on the script.



          For example, if a script is named with the path path/to/script, and it starts with the line #!/bin/sh, then the program loader is instructed to run the program /bin/sh, passing path/to/script as the first argument.



          In your instance, the kernel will use whatever /usr/bin/python points to (I think it is by default python3.6).






          share|improve this answer


























          • thank you very much! gracias!

            – Mr.Caringi
            Mar 21 at 16:13











          • /usr/bin/python should be Python 2.7. This is per PEP 394, which says the command python should be Python 2.

            – wjandrea
            Mar 21 at 16:18













          • @wjandrea Thanks for this :D " end users should be aware that python refers to python3 on at least Arch Linux" I failed to read past python3 when I was searching around for the default

            – j-money
            Mar 21 at 21:28














          1












          1








          1







          This line is called a shebang and it tells the kernel which interpreter to use on the script.



          For example, if a script is named with the path path/to/script, and it starts with the line #!/bin/sh, then the program loader is instructed to run the program /bin/sh, passing path/to/script as the first argument.



          In your instance, the kernel will use whatever /usr/bin/python points to (I think it is by default python3.6).






          share|improve this answer















          This line is called a shebang and it tells the kernel which interpreter to use on the script.



          For example, if a script is named with the path path/to/script, and it starts with the line #!/bin/sh, then the program loader is instructed to run the program /bin/sh, passing path/to/script as the first argument.



          In your instance, the kernel will use whatever /usr/bin/python points to (I think it is by default python3.6).







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 21 at 16:12









          wjandrea

          9,51342765




          9,51342765










          answered Mar 21 at 16:01









          j-moneyj-money

          1,370418




          1,370418













          • thank you very much! gracias!

            – Mr.Caringi
            Mar 21 at 16:13











          • /usr/bin/python should be Python 2.7. This is per PEP 394, which says the command python should be Python 2.

            – wjandrea
            Mar 21 at 16:18













          • @wjandrea Thanks for this :D " end users should be aware that python refers to python3 on at least Arch Linux" I failed to read past python3 when I was searching around for the default

            – j-money
            Mar 21 at 21:28



















          • thank you very much! gracias!

            – Mr.Caringi
            Mar 21 at 16:13











          • /usr/bin/python should be Python 2.7. This is per PEP 394, which says the command python should be Python 2.

            – wjandrea
            Mar 21 at 16:18













          • @wjandrea Thanks for this :D " end users should be aware that python refers to python3 on at least Arch Linux" I failed to read past python3 when I was searching around for the default

            – j-money
            Mar 21 at 21:28

















          thank you very much! gracias!

          – Mr.Caringi
          Mar 21 at 16:13





          thank you very much! gracias!

          – Mr.Caringi
          Mar 21 at 16:13













          /usr/bin/python should be Python 2.7. This is per PEP 394, which says the command python should be Python 2.

          – wjandrea
          Mar 21 at 16:18







          /usr/bin/python should be Python 2.7. This is per PEP 394, which says the command python should be Python 2.

          – wjandrea
          Mar 21 at 16:18















          @wjandrea Thanks for this :D " end users should be aware that python refers to python3 on at least Arch Linux" I failed to read past python3 when I was searching around for the default

          – j-money
          Mar 21 at 21:28





          @wjandrea Thanks for this :D " end users should be aware that python refers to python3 on at least Arch Linux" I failed to read past python3 when I was searching around for the default

          – j-money
          Mar 21 at 21:28



          Popular posts from this blog

          Category:香港粉麵

          List *all* the tuples!

          Channel [V]