sockstat command not found

In this troubleshooting guide we learn how to fix sockstat command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

sockstat: command not found

or when using sudo you get the following error message

sudo: sockstat: command not found

Solutions to sockstat: command not found

How To Fix sockstat: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu sockstat is provided by sockstat package.

sockstat is:

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.

To fix this problem, we can install more using the command below.

sudo apt-get -y install sockstat

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install sockstat.

sudo apt -y install sockstat

Or if you have aptitude installed you can use the following command.

sudo aptitude install sockstat

Summary

In this tutorial we learn how to fix sockstat command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.