trinity command not found

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

Introduction

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

trinity: command not found

or when using sudo you get the following error message

sudo: trinity: command not found

Solutions to trinity: command not found

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

In Ubuntu trinity is provided by trinity package.

trinity is:

As ‘fuzz testing’ suggests, trinity calls syscalls at random, with random arguments. Where Trinity differs is that the arguments it passes are not purely random.

If a syscall took, for example, a file descriptor as an argument, one of the first things kernels does is validate that fd, if is not valid the kernel would just reject it as -EINVAL.

So on startup, Trinity creates a list of file descriptors, by opening pipes, scanning sysfs, procfs, /dev, and creates a bunch of sockets using random network protocols. Then when a syscall needs an fd, it gets passed one of these at random.

Trinity also shares those file descriptors between multiple threads, which causes havoc sometimes.

Warning: This program may seriously corrupt your files, including any of those that may be writable on mounted network file shares. It may create network packets that may cause disruption on your local network. Run at your own risk.

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

sudo apt-get -y install trinity

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

You can also use apt command to install trinity.

sudo apt -y install trinity

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

sudo aptitude install trinity

Summary

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