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}
`-n`
don't translate IP addresses to host names
`-P`
don't translate port numbers to names
`-a`
make a logical AND for the following selections
`-i`
without options select EVERYTHING. Other options come in natural

no more grep-ing with lsof

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