You will always get this error in linux if you haven’t install netstat command. You have to install net-tools to resolve this error, you have to run below command to install it...
After installing net-tools you can run netstat command without any issue.
yum install net-tools
sudo apt install net-tools