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.
135
votes
3answers
43k 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 ...
52
votes
6answers
10k 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 ...
48
votes
8answers
8k 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 ...
43
votes
5answers
16k 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 ...
38
votes
5answers
10k 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 ...
25
votes
3answers
8k 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 ...
24
votes
1answer
6k 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 ...
21
votes
5answers
2k 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 inside ...
20
votes
2answers
5k 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?
19
votes
3answers
13k 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 ...
19
votes
2answers
9k 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 ...
17
votes
4answers
7k 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?
16
votes
13answers
8k views
What's the best prefix/escape sequence for screen or tmux?
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?
14
votes
3answers
2k 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?
13
votes
4answers
12k 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 ...
12
votes
4answers
3k 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 ...
12
votes
2answers
4k 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?
12
votes
2answers
2k views
Maximize window in tmux
tmux shows screen like this:
[root@wpc-fc2 init]# |············
|············
...
12
votes
2answers
2k 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 ...
12
votes
1answer
3k 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?
11
votes
2answers
2k 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 ...
11
votes
2answers
3k 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 ...
10
votes
1answer
3k 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 ...
10
votes
2answers
1k 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 ...
9
votes
4answers
6k 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 ...
9
votes
5answers
4k 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 ...
9
votes
1answer
3k 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 ...
8
votes
1answer
4k views
How can i search within the output buffer of a tmux shell?
I don't get his to work. How can i search the buffer of a tmux shell?
8
votes
4answers
576 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. ...
8
votes
1answer
5k 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, ...
7
votes
1answer
3k views
tmux and text selection with mouse through putty
I'm running tmux in a putty session. Normally(running just a plain shell or GNU Screen) to select text I'd just left click and drag the mouse across some text.
With tmux, I have to hold shift while ...
7
votes
1answer
3k 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 ...
7
votes
2answers
1k 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 ...
6
votes
3answers
4k 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
893 views
tmux status bar messages last only about a second: can I extend this?
I've searched through the man pages several times for a way to set the length of time that status bar messages (what you see if you enter display-message "hello world" at a tmux command prompt) are ...
6
votes
2answers
2k 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 ...
6
votes
2answers
1k views
Is there a way to have shared control tmux session?
I'm looking for something similar to the screen -x of gnu screen for Linux
6
votes
3answers
736 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 ...
6
votes
4answers
3k 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
2answers
930 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 ...
6
votes
5answers
2k 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.
6
votes
1answer
2k views
tmux refresh display after terminal width change
With screen, in a terminal that's 80 columns wide, I can do something like:
for i in $(seq 81); do echo -n "m"; done; echo
and then resize the window to be a little wider, and the last 'm' jumps up ...
6
votes
1answer
298 views
How to show current mode in status-line in tmux?
In vim: :set showcmd tells me what key I've typed(such as f).
In tmux: after typing Ctrl-b, I stop to think about the next key I need.
Sometimes I forgot I've typed Ctrl-b, so I type it again, it ...
6
votes
1answer
278 views
Native xterm mouse scrolling in tmux
I have decided to try tmux as GNU screen replacement and wonder if there is a way to scroll with mouse as in xterm?
It is possible to enable native xterm scrolling with Shift + PageUp in tmux by
set ...
6
votes
1answer
263 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 ...
5
votes
2answers
928 views
tmux died and says “no sessions” - is there any way to recover?
This sucks.
$ tmux attach-session
no sessions
My sysadmin upgraded tmux and now I can't reattach. My processes are still running according to ps ux. Is there any hope of recovering my session?
...
5
votes
1answer
605 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 ...
5
votes
1answer
630 views
Tmux with non-alphanumeric prefix
I have tmux 1.5 installed on a couple of Ubuntu machines and I have this in my ~/.tmux.conf:
unbind-key C-b
set-option -g prefix C-\
So, on a couple of RedHat machines I have ssh access to (but not ...
5
votes
3answers
1k 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 ...
5
votes
1answer
146 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 ...