J.P. Morgan interview question

How to check active connection on Linux box