How To Install Tmux
Saturday, Aug 3, 2024 | 2 minutes read | Update at Saturday, Aug 3, 2024
To install tmux
, a terminal multiplexer, on various operating systems, you can follow the instructions specific to your platform. Below are the steps for common Linux distributions, macOS, and Windows.
Debian-based Linux (e.g., Ubuntu)
For deb based distributions like Debian, Ubuntu, Mint etc. e can use the apt package manager to install tmux in a fast way.
-
Update the package list: The first step is updating the package information for the apt with the following command.
sudo apt update
-
Install tmux: We can install tmux with the package name tmux like below.
sudo apt install tmux
Red Hat-based Linux (e.g., Fedora, CentOS)
We can use the yum or dnf package manager for the RedHat, Fedora, CentOS, OpenSUSE, OpenMandriva, and Oracle Linux and similar rpm based Linux distributions to install tmux.
-
Update the package list: As always we update the package information with the following yum command.
sudo yum update
-
Install tmux: yum or dnf based distributions used the tmux as the package manager where we use it like below.
sudo yum install tmux
For Fedora, you might use
dnf
instead ofyum
:sudo dnf install tmux
Arch Linux
Arch Linux uses the tmux name as the package name.
- Install tmux:
We can use the pacman package manager to install tmux.
sudo pacman -S tmux
macOS
macOS provides the brew package manager to install 3rd party applications. If you do not have it install the brew as the first step with the following command.
-
Install Homebrew (if you don’t already have it): This command simply downloads the brew package manager installation file from github and installs it.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Install tmux using Homebrew: Now we can simply install tmux with the brew like below.
brew install tmux
Windows
On Windows, you can use the Windows Subsystem for Linux (WSL) to install and run tmux
.
-
Enable WSL and install a Linux distribution from the Microsoft Store (e.g., Ubuntu).
-
Open your WSL terminal and follow the instructions for Debian-based Linux:
sudo apt update sudo apt install tmux
After installing tmux
, you can start it by simply typing tmux
in your terminal.