Which process is using that port?

A simple example: to find out which process is using TCP port 8080

$ fuser -n tcp 8080
Advertisements

October 27, 2008. Tags: , , . Uncategorized. Leave a comment.

Passing environment variables to sudo

You can pass environment variables such as $PYTHONPATH to sudo like this:

sudo env PYTHONPATH=$PYTHONPATH /some/python/script

October 27, 2008. Tags: , . Linux. Leave a comment.