Questions tagged [tmux]

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.

Features that differentiate tmux from GNU Screen are:

  • menus for interactive selection of running sessions, windows or clients
  • window can be linked to an arbitrary number of sessions
  • vi-like or Emacs command mode (with auto completion) for managing tmux
  • lack of built-in serial and telnet clients
  • different configuration language
  • different command keys—it is not a drop-in replacement for screen

For more information have a look at the project page of tmux.

1342 questions
397
votes
11 answers

Write all tmux scrollback to a file

How can I write all the scrollback in a tmux session to a file? capture-panel can grab the current screen, but not the entire scrollback.
342
votes
7 answers

How do I equally balance tmux(1) split panes?

I'm looking for a behavior that is similar to how vim(1) handles its split windows with ^w =. I know tmux(1) has predefined layouts with ^b Meta[1-5], but this likely does not have the layout that I am currently using. When splitting a window, it…
306
votes
8 answers

Moving tmux pane to window

How do I move an existing pane into another window in tmux when I have multiple windows, and vice versa? I'm coming from screen, where I can switch to the pane and then switch windows until I get to the one I want; tmux does not seem to allow this.
mrlanrat
  • 3,163
204
votes
13 answers

How to start tmux with attach if a session exists

If I use tmux attach I can attach to a running session but if there is no session running, I only get the error no sessions How can I automatically start a new session if there is none running? something like tmux attach-or-create-new-session
rubo77
  • 28,966
190
votes
5 answers

Renumbering windows in tmux

I frequently end up with more than ten windows in tmux. Later on, I close some of my older ones. Is there a way to renumber, say window 15, to window 3 (which doesn't exist anymore)? Or to pack them all up again, so that there are no empty slots?…
dogbane
  • 29,677
138
votes
1 answer

Attach to different windows in session

I have a pretty simple tmux session running with two open windows; one of them for local hacking and one of them for work. What I'd like to do is to simply connect to the hacking window while leaving the work window open in another terminal.…
Naftuli Kay
  • 39,676
135
votes
1 answer

How to make tmux count windows starting from 1 instead of 0?

I was able to make GNU Screen start counting windows with the number 1 instead of the default 0 with this code in my .screenrc: # Get rid of screen 0 bind c screen 1 bind ^c screen 1 bind 0 select 10 When I created windows in .screenrc I used…
hekevintran
  • 3,633
  • 3
  • 14
  • 9
113
votes
8 answers

tmux status-bar corrupted after catting a binary file, how to reset?

I accidentally screw up my tmux terminal after cating a binary file. Now my tmux is messed up. Detaching and re-attaching doesn't help, nor does a redraw (C-b r). Running reset only redraws the active pane, not the rest. Running ssty sane either in-…
gerrit
  • 3,487
98
votes
2 answers

Is there an easy way to "restart" a tmux pane?

Assume I have a tmux (1.7) window split as follows: ________________________ | 1 | | | |-----------+------------| | 2 | 3 | |___________|____________| Now, the vertical sizes have been…
0xC0000022L
  • 16,593
97
votes
5 answers

How do you hide a tmux pane?

I have 3 panes in my tmux window: -------------------------- | | 2 | | | | | 1 |----------| | | 3 | | | | -------------------------- Panes 1 and 2 have vim.…
user881300
  • 1,529
  • 2
  • 13
  • 14
87
votes
3 answers

Tmux, change window pane by mouse click

Is it possible to use the mouse to navigate between different window panes which are split vertically or horizontally?
daisy
  • 54,555
80
votes
6 answers

protocol version mismatch (client 8, server 6) when trying to upgrade

I'm trying to upgrade to a newer version (that has a bug fix) than my current 1.6. I am on Ubuntu and recently upgraded to Ubuntu 13.04. Ideally I want to use tmux version 1.8 or even 1.9. I've downloaded newer versions but can't get them working. I…
75
votes
6 answers

Tmux not sourcing my .tmux.conf

I installed tmux locally (without root priviledges). I also created my .tmux.conf file in my home directory with the following lines: unbind-key C-b set -g prefix C-o bind-key C-o send-prefix However, tmux does not seem to be sourcing this file (my…
72
votes
2 answers

How can I move tmux's status bar to the top?

How can I move tmux's status bar to the top? Can't find it on the man page.
65
votes
4 answers

How to switch directly to a pane in Tmux?

I'd like to switch directly to a pane in Tmux, by pane #. How can I do this? I know how to cycle between panes, and move to panes that are beside the current pane. I'd like to be able to run the display-panes command, which shows the "pane #" on…
Brad Parks
  • 1,669
1
2 3
25 26