How do I know python path on linux ubuntu?

python, python-2.7, ubuntu-12.04

Solution

First, I hope you don't really set `PYTHONPATH=/etc`, `/etc` is for configuration files, not python libraries.

You can see what an environment variable is set to by using `echo`, e.g.: `echo $PYTHONPATH`. If the variable has not been set it will be blank. You can also use `env` to get a list of all environment variables, and couple with `grep` to see if a particular one is set, e.g. `env | grep PYTHONPATH`.

Problem

In ubuntu linux if we want to set up python path we do something like this: ``` export PYTHONPATH=/etc ... ``` Now, how I would know what the current path I have?

Original source