torsocks command not found

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

Introduction

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

torsocks: command not found

or when using sudo you get the following error message

sudo: torsocks: command not found

Solutions to torsocks: command not found

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

In Ubuntu torsocks is provided by torsocks package.

torsocks is:

Torsocks allows you to redirect network traffic of individual SOCKS-friendly applications through the Tor network. It also ensures DNS queries are handled correctly and explicitly blocks all UDP traffic from the application in question. It is possible that a given application can leak user/system data at a level that neither Tor nor torsocks can control, a 100% guarantee of being safe to operate with Tor can not be given for applications.

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

sudo apt-get -y install torsocks

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

You can also use apt command to install torsocks.

sudo apt -y install torsocks

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

sudo aptitude install torsocks

Summary

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