Questions tagged [tmux]

tmux is terminal multiplexer software, allowing users to work with terminals using multiple windows and panes, which can be created, removed, attached, and reattached as needed.

From the tmux website:

tmux is a terminal multiplexer: it enables a number of terminals (or windows), each running a separate program, to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached.

tmux is largely designed to be a differently designed and BSD-licensed alternative to GNU screen. IRC support can be found in #tmux on the freenode network.

Features:

  • Runs on OpenBSD, FreeBSD, NetBSD, Linux and OS X
  • Panes - similar to the ones found in Vim
  • Client-Server model, allowing windows to be moved across sessions and allowing multiple clients to share the same session
  • 256-color support
  • UTF-8 support

Website:

Screenshot:

tmux session

1076 questions
1920
votes
15 answers

How do I scroll in tmux?

How do I scroll with either the keyboard or mouse? The tmux man page indicates one must enter copy-mode to scroll. Is there a way to quickly scroll without manually entering copy-mode?
chadoh
  • 19,369
  • 3
  • 16
  • 9
621
votes
24 answers

How do I reorder tmux windows?

In screen, I can just type C-a :number 0 to move a window to the top of the window list and push all the other windows down one. What's the equivalent command sequence for tmux? I looked at the man page, but I'm finding it confusing on this point.
dan
  • 7,227
  • 5
  • 23
  • 23
456
votes
2 answers

How do I rename a session in tmux?

When I first started using tmux, I didn't give my first session a name. Then, as I started creating different sessions for different tasks (work, play, etc), I started naming my sessions. Now I have a bunch of different sessions, but the first one…
Richard Jones
  • 5,468
  • 3
  • 18
  • 14
400
votes
6 answers

Restore tmux session after reboot

Is there any way to save a tmux session? In other words, if I reboot the computer, will I always lose the sessions?
KendallB
  • 4,111
  • 3
  • 14
  • 6
374
votes
12 answers

Scroll shell output with mouse in tmux

Mouse scrolling doesn't work in tmux the way it works when I run shell without tmux (in Gnome Terminal). It seems tmux sends mouse scroll events as if I pressed Up/Down keys. But I want it to scroll though the shell output history. Is there a way to…
user31494
  • 3,853
  • 3
  • 16
  • 6
365
votes
8 answers

tmux vs. screen

I'm about to get back into using GNU Screen, but I have been hearing people occasionally mention tmux as a better alternative. Does it really offer an alternative to all the features Screen offers, such as activity monitoring in different windows,…
Alison R.
  • 4,190
  • 3
  • 19
  • 13
360
votes
4 answers

How does one swap two panes in Tmux?

I have two panes in horizontal split. I'd like to have the pane currently on the right to be on the left in the window. I'm not talking about moving the focus (Ctrl+B o). How do I achieve this? 'left pane' <--> 'right pane'
oddRaven
  • 3,835
  • 2
  • 12
  • 10
322
votes
4 answers

How can I search within the output buffer of a tmux shell?

I can't get this to work. How can I search the buffer of a tmux shell?
NES
  • 3,331
  • 3
  • 15
  • 6
316
votes
4 answers

How to convert 2 horizontal panes to vertical panes in tmux?

After doing join-pane on 2 windows, you have 2 horizontal panes. How do I rearrange the panes to be vertical panes instead?
krishonadish
  • 3,271
  • 2
  • 15
  • 6
306
votes
12 answers

"Maximizing" a pane in tmux

Sometimes it would be very useful to maximize a pane in tmux and then restore it to it's previous size. I've been reading the manual and I can't find a way. What I've come up with is that I could bind a key to resize the pane to "max" width, and…
Ivan
  • 4,479
  • 5
  • 25
  • 26
221
votes
4 answers

Move pane to a new window in tmux

I know that it's possible in tmux to join a window as a pane, but is it possible to move a pane to it's own window (tab)? I tried searching it up the man page but couldn't find it. I guess it is possible doing it through a shell script, but is there…
Mikey S.
  • 2,519
  • 2
  • 16
  • 11
220
votes
13 answers

How can I make tmux use my default shell?

On a new setup, tmux is using bash instead of my default (zsh). How can I force it to use zsh?
re5et
  • 2,313
  • 2
  • 14
  • 4
200
votes
7 answers

How to detach a tmux session that itself already in a tmux?

I've opened a tmux session on my local machine, and ssh'd into the remote machine. After this, I typed tmux attach on the remote machine, then I got a remote tmux session on my local tmux session. Now I want to detach from the remote tmux session,…
superadmin
  • 2,113
  • 2
  • 13
  • 10
181
votes
7 answers

How does the tmux color palette work?

I'm trying to set something to gray, but can't figure out how. The only bit of info in the man page about colors I can find is: message-bg colour Set status line message background colour, where colour is one of: black, red, green, yellow, blue,…
Lawrence
  • 1,957
  • 3
  • 12
  • 10
175
votes
2 answers

Uppercase "M" at the right of window name in tmux

For some reason, occasionally, an uppercase M appears at the right side of the window name, so the window name looks like this: 1:bash*M I'm pretty sure is because I'm pressing some combination that causes this. What is it and what does it means?
André Wagner
  • 1,883
  • 2
  • 11
  • 6
1
2 3
71 72