Posts: 26,011
Threads: 2,901
Joined: May 2025
Reputation:
0
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?
Posts: 11,917
Threads: 606
Joined: May 2025
Reputation:
0
When terminal starts, it reads a file (likely .bashrc) that has search paths. It will automatically search for programs in those locations.
Posts: 26,011
Threads: 2,901
Joined: May 2025
Reputation:
0
Ah, so the installer probably wrote to that file.
Thanks
Posts: 15,842
Threads: 95
Joined: May 2025
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.
Posts: 37,099
Threads: 2,599
Joined: May 2025
Reputation:
0
`which python` will show you which version of python its finding.