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

1119 questions
2062
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
  • 20,789
  • 3
  • 18
  • 9
666
votes
25 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,687
501
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,928
  • 3
  • 20
  • 14
432
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,431
410
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
  • 4,335
403
votes
14 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
  • 4,143
387
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,490
349
votes
6 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,601
343
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,541
  • 2
  • 16
  • 6
322
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,679
238
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,729
234
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,453
228
votes
6 answers

How to close a tmux session

I am using tmux to manage multiple terminal windows. Currently I have 2 windows open with multiple panes. I know that I have to use the prefix (for me it is ctrl+a) to enter commands. How can I close the session from inside of tmux? What command…
ph3nx
  • 2,383
  • 2
  • 14
  • 6
226
votes
8 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,373
  • 2
  • 14
  • 10
191
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
  • 2,057
  • 3
  • 13
  • 11
1
2 3
74 75