Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How does the terminal know where python 3.6 is located?
#1
In usr/bin, I have python 2.7 (pre)installed.

I installed python 3.6, and when I'm in usr/bin, I can simply type python3.6 and it starts up even though the installer didn't put the program there. How is this possible?
Reply
#2
When terminal starts, it reads a file (likely .bashrc) that has search paths. It will automatically search for programs in those locations.
Reply
#3
Ah, so the installer probably wrote to that file.

Thanks
Reply
#4
usr/bin was probably already defined as part of the search path to be used for commands. It is a fairly standard location for unix commands to be found.
Reply
#5
I always know where MY python is Confusedmiley-shocked003:
Reply
#6
`which python` will show you which version of python its finding.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)