LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Command Path (https://www.linuxquestions.org/questions/linux-newbie-8/command-path-4175624041/)

krishnar 02-19-2018 05:17 PM

Command Path
 
Hello Experts,

I certainly know that this is a noob question, but please help me.

Code:

user@5CG5372W36:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
user@5CG5372W36:~$

user@5CG5372W36:~$ which python
/usr/bin/python
user@5CG5372W36:~$ which python3
/usr/bin/python3
user@5CG5372W36:~$

How does the command 'python' directed to /usr/bin/python AND 'python3' directed to /usr/bin/python3. Where is the configuration for this?

scasey 02-19-2018 05:29 PM

It's two different files...although I'm curious what
Code:

ls -l /usr/bin/python*
shows you.

krishnar 02-19-2018 05:30 PM

I think I have found the answer myself. :)

user@5CG5372W36:/usr/bin$ ll | grep "python "
lrwxrwxrwx 1 root root 9 Mar 17 2015 python -> python2.7*

user@5CG5372W36:/usr/bin$ ll | grep "python3 "
lrwxrwxrwx 1 root root 29 Jul 16 2015 dh_python3 -> ../share/dh-python/dh_python3*
lrwxrwxrwx 1 root root 9 Jul 15 2015 python3 -> python3.4*


All times are GMT -5. The time now is 02:25 PM.