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.

  1. Update the package list: The first step is updating the package information for the apt with the following command.

    sudo apt update
    
  2. 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.

  1. Update the package list: As always we update the package information with the following yum command.

    sudo yum update
    
  2. 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 of yum:

    sudo dnf install tmux
    

Arch Linux

Arch Linux uses the tmux name as the package name.

  1. 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.

  1. 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)"
    
  2. 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.

  1. Enable WSL and install a Linux distribution from the Microsoft Store (e.g., Ubuntu).

  2. 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.

© 2024 Linux and Python Tutorials

🌱 Powered by Hugo with theme Dream.