tmux is a terminal multiplexer, which allows users to work with terminals in terms of windows and panes, which can be created, destroyed, attached, and reattached at will.

learn more… | top users | synonyms

76
votes
9answers
18k views

“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 ...
32
votes
3answers
17k views

256 color support for vim background in tmux

while using vim within tmux I can see that 256 color support is enabled. with $tput colors However changing the colorscheme in vim while in tmux will change the colorscheme on a per line basis but ...
21
votes
2answers
6k views

How to get shift+arrows and ctrl+arrows working in Vim in tmux?

This is all in iTerm2 on OS X. I used to have export TERM='xterm-256color' in my .bashrc. This meant Vim in tmux did use 256 colors. And once I added set -g xterm-keys on then keyboard ...
288
votes
4answers
103k views

How do I scroll in tmux?

I just started using tmux, and I really like it, but I need to be able to scroll within the buffers/panes/windows I have open. I don't care if it works with the mouse or not. When I search the tmux ...
72
votes
4answers
20k views

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?
14
votes
6answers
5k views

How can I get ssh-agent working over ssh and in tmux (on OS X)?

I have a private key set up for my github account, the passphrase to which is, I believe, stored in OS X's keychain. I certainly don't have to type it in when I open a terminal window and enter ssh ...
6
votes
5answers
3k views

Binding a tmux key to multiple commands

I launch multipane tmux window to monitor several server parameters. With Ctrl-S I can open a new window with another monitor command. Now I want to bind Ctrl-Q to open another multipane window with ...
19
votes
4answers
15k views

Byobu versus gnu screen versus tmux

So far I have used konsole to manage multiple shell sessions but it seems that byobu, gnu screen, and tmux offer a better support for multiple shells. I have never used neither of them before. One of ...
16
votes
3answers
3k views

copy-paste not working in MacVim when launched in tmux

MacVim's copy-paste stops working when I launch it from a tmux terminal (on zsh). If I exit tmux and then launch MacVim copy-past works. Any idea how to fix this?
3
votes
5answers
3k views

Messed up keys in vim when running inside tmux

I have been playing with tmux and I'm loving it. However, there's an annoying issue when running vim inside it. Somehow the arrow keys get remapped, but only on certain times, like when firing up ...
3
votes
1answer
697 views

ssh-agent key timeout with screen or tmux on bastion host

Normally I have ssh-agent running, I ssh to my bastion host then open a tmux session and connect to other boxes through that. Key forwarding works for any sessions that I open from that point ...
9
votes
6answers
4k views

Using tmux with both emacs and vim

What is the best default key binding for tmux and why if one sometimes uses emacs and sometimes uses vim (on Linux Mint 12)? Ctrl-b is OK, but that conflicts a bit with the bash shell and emacs.
103
votes
8answers
27k views

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 ...
76
votes
5answers
28k views

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 ...
53
votes
5answers
18k views

tmux vs. screen

I'm about to get back into using 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 ...
43
votes
4answers
16k views

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

What's the best prefix/escape sequence for screen or tmux? [closed]

Screen goes with CTRL+a. tmux, as developed within screen, uses CTRL+b. Both are also keystrokes in other editors, shells, etc. What do you suggest, which one conflictes at least with other programs?
20
votes
4answers
19k views

How do I get tmux to open up a set of panes without manually entering them?

So, I want to make a project-specific tmux session that pops up certain commands in certain panes automagically. Following an online tutorial and the tmux man page, this is what I come up with for a ...
15
votes
2answers
3k views

tmux and screen-256 TERM not supported on remote hosts

I have set up my tmux to use screen-256colors and it works great with vim. However, when I ssh to a remote host from within tmux, screen-256colors isn't recognized, so I'm getting errors like this: ...
21
votes
2answers
6k views

Tmux and ZSH custom prompt : bug with window name

I have customized my ZSH prompt with oh-my-zsh to make it more readable and add information about git if I'm in a repository. Example : bob@inf [~/docs] % bob@inf [~/src/nicest] master % (in a git ...
16
votes
1answer
5k views

Binding a command in tmux without using the prefix key

Is it possible to bind a tmux command to a key combination and use it directly without first pressing the prefix? I find C-b + n too cumbersome to switch panes, so I was wondering whether I could ...
15
votes
1answer
5k views

Use terminal scrollbar with tmux

I know how to scroll in tmux using the keyboard, but I noticed that it looks like there's a way to use the terminal scrollbar with GNU Screen. Can this be done with tmux?
12
votes
1answer
2k views

Can't resize vim splits inside tmux

Everything working fine outside tmux. But in tmux I can't resize vim splits with mouse. I have set mouse=a in .vimrc enabled. is there's any solution for this? .tmux.conf: $ cat ~/.tmux.conf ...
19
votes
2answers
7k views

Tmux: How can I link a window as split-window?

how can I grab a window from totally different tmux session and attach it as a horizontal/vertical split to current window?
14
votes
3answers
11k views

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

I've opened a tmux session on my local machine, and ssh to the remote machine. After this, I typed command "tmux attach" on the remote machine, then I got a remote tmux session on my local tmux ...
6
votes
2answers
2k views

Can I set a default title for a tmux window?

Right now the title defaults to reattach-to-user-namespace (OS X), which is pretty annoying. Is there an option I can put into my tmux.conf to get another default title? If not, how would I make a ...
1
vote
1answer
3k views

Running nicklist with irssi using screen inside tmux?

I try to run the nicklist addon with irssi using screen inside tmux but strangely :) it doesn't work and I get the input on top of the screen. Is it possible to run nicklist when you are on tmux?
2
votes
1answer
2k views

How do I bind the tmux prefix key to C-'?

I'd like to set my tmux prefix key to Ctrl-apostrophe, but when I use set-option prefix "C-'" or set-option prefix C-"'", tmux complains that "unknown key: C-'". Similarly for ` and :. Is there a way ...
6
votes
5answers
8k views

rename tmux window name to prompt_command, ps1 or remote ssh hostname?

I would love to be able to have my tmux window title automatically renamed to prompt_command, ps1 or just the hostname of a machine I ssh to. having 9 windows opened labeled "ssh" is really useless. ...
5
votes
1answer
3k views

How to enter copy mode on mouse scroll in tmux?

The mouse scroll wheel does not work when not in copy mode. I'm not sure whether it is supposed to be working then? When in copy mode, the scroll wheel does work. The problem is that I still need to ...
4
votes
2answers
1k views

tmux: Cannot SSH from inside tmux, even though I have agent-forwarding (ssh -A) on [duplicate]

So I have keys to some servers stored locally on my MacBook, but I work from inside a Virtual Machine a considerable amount of time, so I SSH to the VM with ssh -A. This allows me to SSH to servers ...
3
votes
1answer
490 views

tmux — any way to enable scrolling, but not selection?

I like that when mode-mouse is on in tmux, I can scroll through the buffer, but I don't like that I can't copy stuff to my OS clipboard by selecting it (as when tmux is disabled). Question: Is there ...
2
votes
3answers
2k views

Why are random letters inserted in my tmux session?

Sometimes when I use the mouse, or press and hold a movement key in tmux, random characters are inserted. For example, when I press the left movement key D is often inserted. A left mouse click often ...
4
votes
2answers
479 views

Where's the defaul tmux configuration file?

I'm looking for the default .tmux.conf or something like it. I'm trying to get rid of some noise in the status line that the default creates.
3
votes
1answer
796 views

Prevent an already running background process from being stopped after closing SSH client

I have a process running on my Linux machine (Debian squeeze) that takes hours (or days) to finish. I don't want to stop it to restart it again with screen, tmux or with an output redirect to nohup. ...
1
vote
1answer
205 views

Is there a way to persist tmux sessions across reboots?

In particular, can the tmux session data be written to a file, and reloaded on reboot? I'm thinking of something similar to Vim's mksession command.
1
vote
1answer
2k views

Solarized background colour off in emacs under tmux

Exhibit I: plain Emacs. Exhibit II: Emacs under tmux. The shades of colours are different, and importantly, the background colour differentiation is nil (e.g. look at the top menu). Anyone run ...
0
votes
1answer
375 views

quit tmux server and end all running processes

I am running a tmux server configured by tmuxinator. In one pane my django server is running: python manage.py run_gunicorn If i quit tmux by calling the kill-server command, the run_gunicorn ...
0
votes
2answers
531 views

tmux chain keyboard shortcuts, or equivalent for screen's `bind -c` + `command -c`

One nice feature of screen is its ability to assign keyboard shortcuts to groups called "classes". With bind -c, you could assign that shortcuts to a particular class, and binding command -c ...
1
vote
0answers
184 views

Resume term after ssh disconnect without multiplexer (screen/tmux)

Screen and tmux (like emacs) are fancy feature rich terminal multiplexers designed to let you efficiently manage terminals as if it was 1985 but they just complicate the simple task of resuming an ssh ...
1
vote
2answers
263 views

Is it possible to spawn an ssh-agent for a new tmux session?

I've seen lots of hacks for re-establishing contact with a GUI session's SSH agent from within tmux (and screen) sessions. I'm wondering if it's possible to de-couple from the GUI and spawn an ...
0
votes
1answer
70 views

How to use Console2 with tmux

I am able to start tmux using the mintty terminal included with cygwin. However, when using Console2 (running on 64-bit windows 7 and using C:\cygwin64\bin\bash.exe as the shell), I get the following ...
0
votes
1answer
508 views

How to execute a cleanup command on tmux server/session exit?

To improve my workflow a little I have written a few wrapper scripts to automatically start some commands when I want to work on a project. When I'm done however, and clean all the tmux tabs for this ...