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

344
votes
4answers
125k 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 ...
118
votes
9answers
34k 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 ...
91
votes
6answers
33k 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 ...
88
votes
9answers
21k 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 ...
78
votes
5answers
26k 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?
76
votes
1answer
21k views

tmux - How do I rename a session?

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 ...
63
votes
5answers
22k 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 ...
45
votes
4answers
19k 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 ...
44
votes
5answers
5k views

Unable to use pbcopy while in tmux session

Running tmux 1.4 installed from ports on snow-leopard I am unable to use the built in OSX pbcopy command. Outside of tmux: > echo "abc" | pbcopy > echo $(pbpaste) # or using ^v abc But ...
43
votes
6answers
19k views

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?
38
votes
4answers
21k 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 ...
37
votes
3answers
7k views

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?
35
votes
15answers
20k 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?
34
votes
4answers
9k views

tmux disregarding the configuration file

I just installed tmux on Ubuntu 10.04 and tried to remap the prefix key to C-a by creating the file ~/.tmux.conf with these lines: set-option -g prefix C-a unbind-key C-b When starting tmux, both ...
33
votes
1answer
14k 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?
30
votes
4answers
19k 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 ...
30
votes
3answers
22k views

selecting text tmux copy-mode

I run tmux in VI mode. VI-like navigation in copy-mode works fine. However, I can't select any text. Neither v nor V doesn't switch to VI-like text selecting mode. What am I missing? By the way, is ...
28
votes
3answers
7k views

tmux exits with [exited] on mac os x

I just installed tmux (a terminal multiplexer) with homebrew. When I try to run it, it always exits with [exited] Nothing shows up. When I try to run tmux list-session I get an error: failed ...
26
votes
3answers
7k 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 ...
24
votes
2answers
4k views

Slight delay when switching modes in vim using tmux or screen

Switching to and from insert mode in Vim is no longer instantaneous since I use tmux. After pressing Esc in insert mode, it takes a noticeable amount of time to actually get out of insert mode. After ...
23
votes
3answers
8k views

Tmux - move pane to new window

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

vim freezes inside tmux

I'm using split panes in tmux - one being vim, other shell. Sometimes, around once a day, vim freezes. I can move between panes, perform any tmux commands, just vim doesn't react to anything. This ...
21
votes
2answers
8k 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 ...
21
votes
3answers
4k 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 ...
20
votes
4answers
22k 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 ...
19
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?
19
votes
2answers
5k views

Maximize window in tmux

tmux shows screen like this: [root@wpc-fc2 init]# |············ |············ ...
18
votes
3answers
13k 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 ...
18
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 ...
17
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 ...
17
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: ...
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?
16
votes
4answers
2k 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. ...
16
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 ...
16
votes
1answer
7k 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?
15
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 ...
15
votes
1answer
7k views

Disable the status bar in tmux?

I want to disable the default status bar on tmux. I prefer to treat screen/tmux as persistant session managers, and deprecate the menu/window stuff in favor of my system window manager. I suspect Tmux ...
14
votes
1answer
3k views

How to switch between two latest windows in tmux?

screen has a Ctrl-a,Ctrl-a to switch between two latest windows? How to do it in tmux?
13
votes
5answers
6k views

alternatives to Gnu screen under Cygwin

Are there any terminal multiplexers for Cygwin/Windows other than Gnu's screen? I know of 2 alternatives to the Gnu's screen application: Byobu and TMux. However, neither of these run under Windows ...
13
votes
1answer
2k views

Send ctrl-a in tmux

I'm using tmux as a replacement for GNU screen, and I'm using set-option -g prefix C-a to use C-a as my default. This naturally conflicts with C-a as the emacs-style move to beginning of line ...
13
votes
2answers
2k views

Tmux current pane border not obvious

I'm struggling to tell which pane is the current one in tmux if there are only two. The border only seems to highlight the adjoining edge which makes it impossible to tell. Here's a Gif to highlight ...
13
votes
2answers
2k views

Is there an easy way to save a byobu session such that I can reload it after a reboot?

I understand that there is a way of defining windows that are opened in a session by saving configuration files in $BYOBU_CONFIG_DIR. But is there a way (command or script) to save the current session ...
11
votes
2answers
7k 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 ...
11
votes
2answers
1k views

tmux configuration conditional to OS

There's some lines of my tmux.conf which I'd like executed only if my OS is Mac. However, I'd like to use my tmux.conf on multiple different OS's. How can I make a command conditional to the OS on ...
11
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.
11
votes
2answers
3k views

How do I know current tmux session name, by running tmux command

I'm writing a script. I really want to know this. I hope tmux executable can tell me this. I find tmux rename <newname> can rename current session. But I can't find a command to fetch its ...
11
votes
1answer
7k views

Configuring TMUX's status bar

I want my tmux session to show my current ip address in the right hand side of the status bar but I am having the hardest time figuring up the right syntax. The command works perfectly in the shell, ...
11
votes
2answers
4k views

tmux/screen alternative for powershell

Is there an alternative to tmux/screen that would work on Windows with Powershell? I'm aware of Powerscreen, but it seems dead for a long time. Cygwin wouldn't work with Powershell, would it? Console2 ...
11
votes
3answers
3k views

Synchronize pasteboard between remote tmux session and local Mac OS pasteboard

Setup: I use iTerm2 on MacOS to connect to a remote server. The remote server runs tmux, in which I open files and edit in vim sessions. Problem: I can't copy/paste between the remote tmux session ...
11
votes
1answer
1k views

How to tab completion when typing command in tmux?

Some commands (kill-session and kill-server) have the same prefix. When I type (prefix:kill-seTab), tmux won't give me any result. Is there a option to show wildmenu for auto-completion inside tmux? ...