Server!/Horror! I have a magnet and I don't mind using it!

HowTo: List open network connections for a certain user

Since I always have to look it up in the manpage of lsof(8):

lsof -nP -a -i -u ${USER} # list all network connections for ${USER}
lsof -nP -a -i UDP -u ${USER} # list UDP connections for ${USER}
lsof -nP -a -i TCP -u ${USER} # list TCP connections for ${USER}
lsof -nP -a -i 6 -i TCP -u ${USER} # list IPv6 TCP connections for ${USER}
don't translate IP addresses to host names
don't translate port numbers to names
make a logical AND for the following selections
without options select EVERYTHING. Other options come in natural

no more grep-ing with lsof

Generated: 2017-11-02 10:20:47 +0100