Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I normally work in python on Windows and I use the dos command where python to make sure that I am using the virtual environments version of python. What is the equivalent command in the linux shell?


share|improve this question

migrated from Apr 13 '13 at 21:48

This question came from our site for professional and enthusiast programmers.

I think you are looking for command: ps -aux | grep python – Grijesh Chauhan Apr 13 '13 at 20:01
up vote 8 down vote accepted

Use which python.

$ which python

C:\Users\anossovp>where python
share|improve this answer

The thing you are usually looking for is not where Python itself is, but where it's libraries are. For that I would recommend this:

(from within the Python shell)

import sys
import pprint

Outside of that you can still do which python naturally.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.