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

46
votes
5answers
24k 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 ...
99
votes
9answers
25k 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 ...
93
votes
5answers
33k 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?
25
votes
2answers
9k 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 ...
407
votes
5answers
153k 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 ...
17
votes
6answers
6k 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 ...
8
votes
5answers
4k 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 ...
109
votes
5answers
39k 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 ...
68
votes
6answers
26k 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 ...
36
votes
4answers
23k views

Byobu versus gnu screen versus tmux [closed]

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 ...
40
votes
1answer
18k views

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?
19
votes
1answer
8k 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?
17
votes
3answers
4k 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?
12
votes
6answers
5k 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.
3
votes
5answers
4k 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 ...
4
votes
1answer
960 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 ...
135
votes
10answers
41k 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 ...
54
votes
4answers
22k 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 ...
41
votes
15answers
24k 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?
18
votes
4answers
24k 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 ...
20
votes
2answers
4k 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: ...
30
votes
3answers
8k 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 ...
21
votes
1answer
6k 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 ...
13
votes
2answers
8k views

tmux auto resize panes

in vim, with C-W = the windows are auto resized to the same height. in tmux, with :resize-pane -U 10 I can increment the height of tmux pane in 10. how I can auto resize the panes to the ...
20
votes
3answers
16k 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 ...
22
votes
1answer
2k views

Can't resize vim splits inside tmux

Everything is working fine outside of tmux. But in tmux I can't resize vim splits with the mouse. I have set mouse=a in my .vimrc. Is there a solution for this? .tmux.conf: $ cat ~/.tmux.conf ...
25
votes
3answers
5k views

How can I make ctrl+left/right keys work right in tmux?

In both zsh and bash, ctrl+arrows allows me to move the position I'm typing at by whole word, but this does not work in tmux, which is a problem as I'm currently launching it automatically every time ...
21
votes
2answers
8k 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?
17
votes
4answers
3k views

tmux slow to interrupt process with Ctrl-C

If I run a command with a lot of output in tmux, but decide to cancel it with Ctrl-C, there's a 10-15 second lag before it stops. However, if I do the same thing outside of tmux, it stops immediately. ...
10
votes
3answers
5k 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 ...
19
votes
4answers
3k views

Is there any way to prevent tmux freezing when lots of text is output to the terminal?

In a tmux session inside xterm when a programs generates lots of ouput (like a cat very_long_file the whole session in frozen for a while. Even if I press Ctrl-C nothing is interrupted. Presumably ...
10
votes
1answer
11k views

run or send a command to a tmux pane in a running tmux session

I want to write a shell script which will attach to a named tmux session, select a window (or pane) in that session and run a command in that selected window (or pane). How do I do this from a bash ...
5
votes
1answer
2k views

tmux: enable mouse scrolling in vim instead of history buffer

I have just started using tmux 1.8 recently, after working with screen for a while. After reading things here and there on the internet, I came up with following ~/.tmux.conf However when I open vim ...
2
votes
1answer
3k 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 ...
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?
6
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 ...
5
votes
4answers
3k 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
1answer
6k views

Attempting to install tmux on CentOS 6.4 or CentOS 6.5 fails with error: ‘EVBUFFER_EOL_LF’ undeclared

I tried compiling tmux using the following steps: yum -y install ncurses-devel libevent-devel wget http://downloads.sourceforge.net/tmux/tmux-1.9a.tar.gz tar -xvzf tmux-1.9a.tar.gz cd tmux-1.9a ...
4
votes
1answer
2k views

Is sharing a tmux sockets between hosts possible?

I'm wondering if it's possible to share a tmux server socket between different hosts. For example, I have a virtual machine (guest) running inside my host, and I'm running a tmux session in the guest, ...
9
votes
5answers
10k 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
2answers
2k 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.
5
votes
1answer
870 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 ...
4
votes
2answers
2k 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
902 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. ...
2
votes
0answers
347 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 ...
2
votes
1answer
302 views

optionally run several commands when starting tmux

I have a ~/.tmux/dev file which looks like this: selectp -t 0 # select the first pane splitw -h -p 50 # split it into two halves selectp -t 1 # select the new, second (1) pane splitw -v -p 50 ...
2
votes
3answers
341 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 ...
2
votes
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 ...
1
vote
1answer
154 views

Tmux causeing issues with Bash up-arrow

When using tmux, I have issues of ghost characters when using the Up and Down arrow keys in Bash. If I press UpArrow a few times and then press DownArrow a few times, then the first few characters of ...
1
vote
2answers
444 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.