Join WhatsApp
Join Now
Join Telegram
Join Now

How to Install tmux

Avatar for Noman Mohammad

By Noman Mohammad

Published on:

How to Install tmux
Your rating ?

Tmux is a tool that helps you manage multiple terminal windows. Think of it like a magic box for your computer’s command line. You can split screens, run tasks in the background, and never lose work if the internet drops. It’s perfect for coders, sysadmins, or anyone who loves the terminal.

Ready to try tmux? Let’s install it first!


How to Install tmux (3 Easy Ways)

1. For Linux Users
Open your terminal (Ctrl+Alt+T). Type:

sudo apt-get install tmux

Hit Enter. Type your password if asked. Done!

2. For macOS Users
Install Homebrew first. Open Terminal and paste:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then, install tmux:

brew install tmux

3. For Windows Users
Use Windows Subsystem for Linux (WSL). Install Ubuntu from the Microsoft Store. Open Ubuntu and run:

sudo apt-get install tmux

How to Use tmux (Basics)

Start a new tmux session:

tmux new -s mysession

Split Your Screen

  • Vertical split: Ctrl+b then %
  • Horizontal split: Ctrl+b then "

Switch Panes

Press Ctrl+b + arrow keys (←→↑↓).

Detach from Session

Press Ctrl+b then d. Your work stays running!

Re-enter a Session

Type tmux attach -t mysession.

Read Also: Gobuster Tutorial


tmux Cheat Sheet

ShortcutAction
Ctrl+b cCreate new window
Ctrl+b nNext window
Ctrl+b pPrevious window
Ctrl+b &Close window
Ctrl+b ,Rename window

How to Delete tmux Sessions

  • List all sessions:
tmux ls
  • Kill a session:
tmux kill-session -t mysession

How to Uninstall tmux

Linux/macOS/WSL

  • Linux/WSL: sudo apt-get remove tmux
  • macOS: brew uninstall tmux

Windows
Uninstall Ubuntu via Settings > Apps.


5 Tips to Master tmux

  1. Use mouse mode: Add set -g mouse on to ~/.tmux.conf.
  2. Customize shortcuts.
  3. Save sessions with plugins like tmux-resurrect.
  4. Practice daily!
  5. Join the tmux GitHub community for updates.

FAQs

Q1. Is tmux free?

Yes! Tmux is open-source and free for everyone.

Q2. Can tmux crash?

Rarely. If it does, reconnect with tmux attach.

Q3. Does tmux work on Android?

Yes! Use Termux app and install tmux there.


Final Words

Tmux makes terminal work fun and easy. Install it today, try the shortcuts, and share this guide with friends! Got questions? Drop a comment below. Happy coding! 🚀

Leave a Comment