When you start daemons or Docker containers that listen to certain ports, you want to make sure they are actually listening. You can use netstat to list listening ports.
As you can see, we can’t tell the process or process ID for each port. If you just add sudo, you can see the process information.
This is an essential tool when you diagnose what’s going on on the host where you want to host daemons/services.