Install sockstat by entering the following commands in the terminal:
sudo apt update sudo apt install sockstat
Description:
view detailed information about open connections
Sockstat is a tool to let you view information about open connections. It is similar to the tool of the same name that is included in FreeBSD, trying to faithfully reproduce as much functionality as is possible. . This version of sockstat contains several additional features, like the ability to look up sockets in use by GID, UID and process name, as well as the other criteria supported by FreeBSD's sockstat.
Homepage: http://nenolod.net/sockstat
Version: 0.3-2
Section: universe/admin