How To Install tmux on Ubuntu 20.04

In this tutorial we learn how to install tmux on Ubuntu 20.04. tmux is terminal multiplexer terminal multiplexer terminal multiplexer

Introduction

In this tutorial we learn how to install tmux on Ubuntu 20.04.

What is tmux

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. Task: server, cloud-image

Package: tmux Architecture: amd64 Version: 3.0a-2ubuntu0.2 Priority: optional Section: admin Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Romain Francoise [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 747 Depends: libc6 (>= 2.27), libevent-2.1-7 (>= 2.1.8-stable), libtinfo6 (>= 6), libutempter0 (>= 1.1.5) Filename: pool/main/t/tmux/tmux_3.0a-2ubuntu0.2_amd64.deb Size: 292144 MD5sum: b50c2a207decdc16ce191f75de1580d8 SHA1: bc94b0c72c035e71427e21f715799b624acbed43 SHA256: cf80efc8ab0d92bec568067dd7f5dc127780a8215f02db5fc366f2a9dd399658 SHA512: 4154791f02bfa13c937fcbb227f635d5a4a094d10a5afea58753568637101f7012568b9dad5d58d40b35fecb10e89141b7ee34a69159e7f514b7d62c1f24784a Homepage: https://tmux.github.io/ Description-en: terminal multiplexer 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. Task: server, cloud-image

Package: tmux Architecture: amd64 Version: 3.0a-2 Priority: optional Section: admin Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Romain Francoise [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 750 Depends: libc6 (>= 2.27), libevent-2.1-7 (>= 2.1.8-stable), libtinfo6 (>= 6), libutempter0 (>= 1.1.5) Filename: pool/main/t/tmux/tmux_3.0a-2_amd64.deb Size: 293764 MD5sum: 1e8d65ba13c70afef5c15fd0183b6a97 SHA1: 01051c7b3bd5815c43e5ff46fa0109ce9d574e2c SHA256: 83eec84b3f3d057f96561c93c6efba6c0d54c3d3bb2a6f24631702abc850d0aa Homepage: https://tmux.github.io/ Description-en: terminal multiplexer 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. Task: server, cloud-image

There are three methods to install tmux on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install tmux Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install tmux using apt-get by running the following command:

sudo apt-get -y install tmux

Install tmux Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install tmux using apt by running the following command:

sudo apt -y install tmux

Install tmux Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install tmux using aptitude by running the following command:

sudo aptitude -y install tmux

How To Uninstall tmux on Ubuntu 20.04

To uninstall only the tmux package we can use the following command:

sudo apt-get remove tmux

Uninstall tmux And Its Dependencies

To uninstall tmux and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove tmux

Remove tmux Configurations and Data

To remove tmux configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge tmux

Remove tmux configuration, data, and all of its dependencies

We can use the following command to remove tmux configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge tmux

References

Summary

In this tutorial we learn how to install tmux package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.