tmux command not found

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

Introduction

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

tmux: command not found

or when using sudo you get the following error message

sudo: tmux: command not found

Solutions to tmux: command not found

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

In Ubuntu tmux is provided by tmux package.

tmux is:

tmux enables a number of terminals (or windows) to be accessed and controlled from a single terminal like screen. tmux runs as a server-client system. A server is created automatically when necessary and holds a number of sessions, each of which may have a number of windows linked to it. Any number of clients may connect to a session, or the server may be controlled by issuing commands with tmux. Communication takes place through a socket, by default placed in /tmp. Moreover tmux provides a consistent and well-documented command interface, with the same syntax whether used interactively, as a key binding, or from the shell. It offers a choice of vim or Emacs key layouts.

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

sudo apt-get -y install tmux

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

You can also use apt command to install tmux.

sudo apt -y install tmux

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

sudo aptitude install tmux

Summary

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