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.

learn more… | top users | synonyms

127
votes
10answers
27k views

tmux vs. GNU Screen

Browsing through questions I found about tmux (I normally used GNU Screen). My question is what are pros and cons of each of them. Especially I couldn't find much about tmux.
88
votes
5answers
26k views

Moving tmux window to pane

How do I move an existing window into a pane in 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 ...
66
votes
2answers
37k views

Getting 256 colors to work in tmux

I have 256 colors working just fine in konsole,. I thought I'd give tmux a try because, unlike screen, it seems to support vi mode. However I find that the colors of my prompt show up and this is ...
54
votes
4answers
12k views

What are other ways to share a tmux session between two users?

I'm looking for a clean and easy way to share a tmux session with another user on the same machine. I've tried the -S socket-path option, but it requires opening up all permissions of the socket-path ...
43
votes
12answers
28k views

Getting tmux to copy a buffer to the clipboard

I am trying to figure out a decent way to copy what I have in a tmux buffer into my clipboard. I have tried a couple of different things like bind-key p select-pane -t 2 \; split-window 'xsel -i ...
42
votes
5answers
13k views

Create new-window with current directory in tmux

Is is possible to open a new-window with its working directory set to the one I am currently in. I am using zsh, if it matters.
37
votes
4answers
11k views

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.
37
votes
3answers
9k views

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 ...
31
votes
3answers
6k views

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 ...
27
votes
1answer
5k views

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 ...
23
votes
4answers
8k views

Is there an equivalent of GNU Screen's “log” command in tmux?

I make heavy use of screen's "log" command to log the output of a session to a file, when I am making changes in a given environment. I searched through tmux's man page, but couldn't find an ...
21
votes
1answer
3k views

How do you make tmux count windows starting with 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 ...
21
votes
1answer
4k views

How can I tell if I'm in a tmux session from a bash script?

I like to keep my bash_profile in a git repository and clone it to whatever machines I have shell access to. Since I'm in tmux most of the time I have a user@host string in the status line, rather ...
18
votes
2answers
3k views

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 ...
17
votes
6answers
19k views

How can I run a script immediately after connecting via SSH?

I started to ask this question but answered it while I had it open. I'm going to post this question, follow it up with my solution and leave it open to other potential solutions. <backstory> ...
16
votes
1answer
2k views

copy (to X clipboard) shortcut in .tmux.conf

In order to copy text to X clipboard in tmux, what I currently do is: go selection mode with prefix[ start selection with space (using mode-keys vi btw) select the text and press enter copy tmux ...
15
votes
4answers
5k views

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 ...
15
votes
2answers
15k views

How do I get the solarized colour scheme working with gnome-terminal, tmux and vim?

There's a lot of questions around this, but it's because there are so many variables. I had to piece together instructions from many sites before I got this working. First, I could not easily set up ...
15
votes
4answers
4k views

Why do I have to re-set env vars in tmux when I re-attach?

I mainly work on a mac and ssh/tmux attach to a Linux machine to do my work. I have ssh-agent running on the Linux machine. I have set -g update-environment "SSH_AUTH_SOCK SSH_ASKPASS WINDOWID ...
14
votes
4answers
5k views

How to get vim to work with tmux properly?

I'm trying to figure out how to get vim and tmux play together. My problem is: When I use xterm-256color I get vim to work nicely, but the background doesn't render properly. I fixed this by using ...
14
votes
2answers
4k views

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.
14
votes
3answers
4k views

Shift-arrow not working in emacs within tmux

I recently started using tmux (was a screen user before) and I'm loving it, except for one small problem. I use emacs within my tmux session and I am used to using Shift-arrow keys to move between ...
13
votes
6answers
12k views

How can I page up or down in tmux with Terminal.app?

I have tmux installed. But I can not scroll up or down. I.e. as soon as I tmux I get only a portion of the screen and can not scroll up. crtl-b + Page Up does not work since I am in Mac and I can not ...
13
votes
3answers
4k views

ESC key causes a small delay in terminal due to its Alt+ behavior

My terminal setup is gnome-terminal + tmux + zsh with vi bindings. In applications like vim or even in the zsh's command line vi editing mode, I need to frequently hit the ESC key but there is a ...
13
votes
2answers
9k views

tmux bottom bar color change

I recently started to use tmux and like it much, but it's green bottom bar is a bit distracting, is there a way to change its color? or a way to hide it?
13
votes
2answers
4k views

tmux, TERM and 256 colours support

Introduction My question arises from the necessity of understanding why I have now (after multiple trials) Terminal and tmux supporting 256 colours and tput colors telling me there are only 8 of ...
12
votes
2answers
6k views

How do I cycle through panes inside a window in tmux like in screen?

I thought Tmux - move window to pane was the same question but it doesn't seem to be. Coming from using GNU screen regularly, I'm looking for tmux to do the same things. On of the things I do ...
12
votes
2answers
1k views

Ctrl-C does not work with pppd non-detached session

I have a Mini2440 ARM Board, and I have put a base Debian 6.0 system on it using multistrap. I have used tmux to run several processes in defferent windows from /etc/rc.local. I connect to the board ...
11
votes
2answers
3k views

Prevent pane/window from closing when command completes - tmux

In my tmux.conf file I have it configured to open windows, name them, setup panes etc.. etc.. However one issue I have is that if one of the panes launches a command, let's say ls, then the pane ...
11
votes
4answers
5k views

How do I bind the tmux prefix to a Super?

I find even Ctrl+b to be very emacs like but I understand the point. I'm wondering if I could bind it to a single keypress of a key I don't other wise use? namely Super_L (also known as the left ...
11
votes
6answers
7k views

How can I set my default shell to start up tmux

I would like my default bash shell to go straight into tmux instead of my always having to type tmux every time.
11
votes
2answers
3k views

tmux session lost in unknown pts, cause and possible solution?

I was trying to re-attach to a long-running tmux session to check up on a python web-application. However tmux attach claims that there is no running session, and ps shows a tmux process (first line), ...
11
votes
1answer
1k views

tmux disable confirmation prompt on kill-window

I've looked through the man pages so this might be asking in vain. I get annoyed at the confirmation message for kill-window (Ctrl-b & or Ctrl-b kill-window on the default setup). This always ...
10
votes
2answers
3k views

Unlimited history in tmux

In your .tmux.conf file you can set the window history with something like: set -g history-limit 4096 Is there a way to set an unlimited history for each window?
10
votes
3answers
4k views

Using Ctrl+B in less within tmux

I use the Ctrl+B command prefix in tmux, however this clashes with Ctrl+B in less, which is used for scrolling up a file. How can I get this to work? Do I have to set a different command prefix in ...
10
votes
3answers
2k views

How can I bind multiple tmux commands to one keystroke?

Specifically I'm trying to give a notification after some command was completed. So, for example, if I reload my configuration file, I'd like to have some confirmation that it worked, which might be ...
10
votes
2answers
3k views

Copy text from one tmux pane to another (using vim)

I have two files opened in vim, each in one tmux pane. I would like to copy let's say 10 lines from one file to another. How can I accomplish this not using the mouse's Copy -> Paste ?
9
votes
2answers
703 views

Two prefix commands for tmux?

We have a tmux session that several people need to connect to. Some people like the Ctrl+a prefix shortcut and some people prefer the default Ctrl+b shortcut. Is there anything I can put in the ...
9
votes
4answers
5k views

Reload of tmux config not unbinding keys (bind-key is cumulative)

I've been experimenting with different tmux keybinding settings and I've noticed the following: If I reload my tmux config (from within tmux) the keybindings I once had loaded will remain loaded. The ...
9
votes
1answer
873 views

Best Practices for SSH, tmux & GnuPG Agent

I'm attempting to consolidate my encryption software to GnuPG, and I'm running into a confusing problem. My primary unit is a headless server, and I exclusively work in tmux. There is no X session, ...
8
votes
3answers
468 views

Is it possible to get a hardcopy in Tmux?

I keep flip flopping between tmux and screen, and right now I'm back on the tmux kick. I've been doing some setup for a friend, and I want to make a hard copy of the session so he can see the commands ...
8
votes
1answer
3k views

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?
8
votes
1answer
501 views

How can I make tmux monitor a window for inactivity?

I've switched from GNU Screen to tmux. They're both similar, except that tmux is still maintained. GNU Screen has a C-a _ ("silence") command. This command makes GNU Screen monitor the current ...
8
votes
1answer
976 views

How to copy from/to the tmux 'clipboard' with shell pipes?

When working in a shell environment I run fairly often into the need to copy 'intermediate pipe output' around (eg. from/to already running editors, to other shells, other machines, etc.). When in a ...
8
votes
2answers
631 views

How do you hide a pane?

I have 3 panes in my tmux window: -------------------------- | | 2 | | | | | 1 |----------| | | 3 | | | | ...
8
votes
2answers
409 views

tmux not respecting disabled control flow

In my shell I have flow control disabled using stty -ixon. This works perfectly in the shell and when I launch tmux and start programs within tmux. However, when starting a new session from the ...
8
votes
3answers
732 views

Make a tmux pane 80 (or so) columns wide

I'm trying to follow the 80 column rule when writing my code, my current tmux setup is split 50/50 horizontally. I like to have vim in the left-hand pane, and in the right-hand pane I have a 75/25 ...
8
votes
2answers
6k views

How do I bind to Shift+{Left,Right} in tmux?

I'm looking at tmux from screen, and have hit a bump while configuring the (highly configurable!) tmux key bindings. Problem is, in my .screenrc I have bindkey ^[[d prev bindkey ^[[c next bindkey ...
7
votes
2answers
2k views

Aliases and tmux

Aliases defined in .bash_aliases and .bashrc don't work in tmux. Can this be changed in some configuration, so the aliases work under tmux?
7
votes
2answers
2k views

New Tmux Panes go to the same directory as the current pane; new tmux windows go to home directory?

Can anyone help me set up this configuration? If I create a new pane, the new pane should start out in the same working directory as the pane I was just in. If I create a new window, the new window ...