LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-19-2018, 06:17 PM   #1
krishnar
Member
 
Registered: May 2016
Posts: 32

Rep: Reputation: Disabled
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?
 
Old 02-19-2018, 06:29 PM   #2
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.7.1908
Posts: 4,269

Rep: Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495
It's two different files...although I'm curious what
Code:
ls -l /usr/bin/python*
shows you.
 
Old 02-19-2018, 06:30 PM   #3
krishnar
Member
 
Registered: May 2016
Posts: 32

Original Poster
Rep: Reputation: Disabled
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*
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Command path is in PATH but bash does not find the command. stf92 Linux - Newbie 17 03-23-2012 05:19 AM
Path of this command mah454 Linux - General 2 12-08-2009 03:07 AM
how to get the absolute path information of a command from ps command output ratul_11 Linux - General 1 08-06-2008 03:10 AM
the `source` command and my $PATH jayeola Programming 6 12-14-2005 11:45 PM
command path question tied2 Linux - Newbie 4 06-24-2002 06:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration