0

Correct me if I am wrong:

If I remember correctly, a command in terminal is linked to a specific executable(or maybe a script is also allowed?) in filesystem/disk.

For example, python runs python2.7 and python3 runs python3.

Now the problem is that I install 2 packages with same terminal command.

pip install packageA
pip3 install packageA

They both has the command packageACommand run. So I want to check the current packageACommand command infomation to see which python/what environments it's using.

And generally, I am wondering how can I view a command's (meta) information? Like checking what it acutally does/linked behind the scene?

Rick
  • 1,157
  • if you don't specify interpreter when running the command, it will run environment default. To control python version the package is run with, specify it before command or see: http://redsymbol.net/articles/env-and-python-scripts-version/ – Bart Aug 14 '19 at 10:01

1 Answers1

1

Use:

which <command>

For example:

 $ which cat
 /usr/bin/cat
  • Ah yes it is. I just can't remember. But some commands are binary executables and some are scripts. I can only open and read the scripts files. – Rick Aug 14 '19 at 10:04