List open ports
11 March 2022 (Updated 18 May 2022)
- lsof: list open files.
- -P: prevent conversion of port numbers to port names (e.g., display
80
instead ofhttp
). - -n: prevent conversion of network numbers to network names (e.g., display
201.87.138.40
instead ofproduction
). - -i: only show internet addresses (i.e., in the form
[protocol][@hostname|hostaddr][:service|port]
).
Example output:
Thanks for your comment . Once it's approved, it will appear here.
Leave a comment