socket command not found

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

Introduction

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

socket: command not found

or when using sudo you get the following error message

sudo: socket: command not found

Solutions to socket: command not found

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

In Ubuntu socket is provided by socket package.

socket is:

The socket program is a simple tool for socket based connections. It can be used to create simple daemons (in both standalone and inetd mode), to connect to other daemons or to redirect ports.

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

sudo apt-get -y install socket

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

You can also use apt command to install socket.

sudo apt -y install socket

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

sudo aptitude install socket

Summary

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