Can lsof show open ports on alpine linux?

user674669 picture user674669 · Feb 1, 2019 · Viewed 9.4k times · Source

I have a spring boot app running in alpine linux listening on port 8080. However, when I do:

$ lsof
$ lsof -i 8080

it doesn't show the open ports. Do you know what I am doing wrong?

It almost seems that lsof on alpine linux isn't honoring any arguments. It always shows the same output - just seems to ignore -i.

Thank you.

p

enter image description here

Answer

KamilCuk picture KamilCuk · Feb 1, 2019

Install lsof from lsof, not from busybox. Busyboxs lsof is just only simple.

apk add lsof

should fix it.