So, I was using visual studio code and wanted to see what option do I have for interpreter in vscode in my Ubuntu 21.04 machine and what I found are these options. First is the virtual environment python interpreter and I guess 2nd is the system python interpreter so what is the 3rd interpreter option that I am getting and this is my question.
What is the difference between /usr/bin/python3 and /bin/python3
Asked Answered
From Linux file-hierarchy manual:
/bin/, /sbin/, /usr/sbin/
These compatibility symlinks point to /usr/bin/, ensuring that scripts and binaries referencing these legacy paths correctly find their binaries.
In my computer (Ubuntu 20.04) /bin/python3
is a link to /usr/bin/python3.8
. Basically, the link /bin/python3
exists so that legacy programs that look for the python executable in /bin
work.
Both /usr/bin/python3
and /bin/python3
are symbolic links to the same Python interpreter. So the only difference between them is path.
The difference between /usr/bin/python3
and /bin/python3
is primarily in their intended use and historical convention:
/bin/python3
typically contains the system-wide Python interpreter binary, essential for core system functionality./usr/bin/python3
holds Python interpreter binaries installed by additional software packages or users.
Example:
/bin/python3
might be used by the system for essential tasks like system scripts./usr/bin/python3
might be used by users or applications for specific tasks or additional functionality, such as running third-party scripts or applications.
© 2022 - 2024 — McMap. All rights reserved.