Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 just downloaded a python script and noticed that the "shebang" line at the top looks like:

#!/usr/bin/env python

instead of the familiar


What's the reason for that?

share|improve this question

This is commonly used if the absolute path of the interpreter binary is not know or is assumed to be in different location from system to system. For python one could have an installation in /usr/local/ in addition to the ones installed by the distribution in /usr/. Without env in the shebang you would have to modify it to reflect your installation in /url/local/.

share|improve this answer
Makes sense. Thanks – Frank Brenner Feb 15 '11 at 12:13
@Frank: if that answered your question, you should accept it (…) – Olli Feb 15 '11 at 12:47

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.