SyntaxHighlighter JS


Find Unused Unix Ports

You need to bring up another Unix web server but port 80 is already in use. How do you find another unused Unix port?

(as one line)

netstat -ln | grep -v LISTENING | awk '{print $4}' | grep ":" | sort | uniq

You will get an output like

The number after the last colon is the port in use, e.g. 80, 123, 5353.  Pick any Unix port not already in use and assigned.

No comments:

Post a Comment