To view all used ports in Linux, you can use the following command:
Clever Cottonmouth
Posted on January 3, 2024
sudo lsof -i -P -n | grep LISTEN
This command utilizes lsof (list open files) to display information about open files and ports (-i) while filtering the output to show only listening ports using grep LISTEN. The -P flag prevents converting port numbers to port names, and -n skips DNS resolution for faster results. Running this command with sudo provides comprehensive access to the system's network-related information.
💖 💪 🙅 🚩
Clever Cottonmouth
Posted on January 3, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
privacy Caught in the Crunch My Journey from Snacks to 2 Million Exposed Users Privacy
November 30, 2024