Questions tagged [tmux]

tmux is terminal multiplexer software, allowing users to work with terminals using multiple windows and panes, which can be created, removed, attached, and reattached as needed.

Filter by
Sorted by
Tagged with
1970 votes
15 answers
1.6m views

How do I scroll in tmux?

How do I scroll with either the keyboard or mouse? The tmux man page indicates one must enter copy-mode to scroll. Is there a way to quickly scroll without manually entering copy-mode?
chadoh's user avatar
  • 19.9k
638 votes
24 answers
313k 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 ...
dan's user avatar
  • 7,397
475 votes
2 answers
269k views

How do I rename a session in tmux?

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 ...
Richard Jones's user avatar
410 votes
6 answers
265k 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?
KendallB's user avatar
  • 4,211
386 votes
14 answers
281k 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 ...
user31494's user avatar
  • 3,973
380 votes
4 answers
177k views

How does one swap two panes in Tmux?

I have two panes in horizontal split. I'd like to have the pane currently on the right to be on the left in the window. I'm not talking about moving the focus (Ctrl+B o). How do I achieve this? 'left ...
oddRaven's user avatar
  • 4,035
373 votes
8 answers
279k views

tmux vs. screen

I'm about to get back into using GNU 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, ...
Alison R.'s user avatar
  • 4,300
332 votes
5 answers
261k 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?
NES's user avatar
  • 3,431
328 votes
4 answers
134k 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?
krishonadish's user avatar
  • 3,391
309 votes
12 answers
155k 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 ...
Ivan's user avatar
  • 4,509
224 votes
4 answers
113k views

Move pane to a new window in tmux

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 ...
Mikey S.'s user avatar
  • 2,569
223 votes
12 answers
188k 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?
re5et's user avatar
  • 2,343
213 votes
7 answers
240k 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'd into the remote machine. After this, I typed tmux attach on the remote machine, then I got a remote tmux session on my local tmux session. Now ...
superadmin's user avatar
  • 2,243
197 votes
6 answers
440k views

How to close a tmux session

I am using tmux to manage multiple terminal windows. Currently I have 2 windows open with multiple panes. I know that I have to use the prefix (for me it is ctrl+a) to enter commands. How can I ...
ph3nx's user avatar
  • 2,073
185 votes
7 answers
146k 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 ...
Lawrence's user avatar
  • 1,997
177 votes
2 answers
31k views

Uppercase "M" at the right of window name in tmux

For some reason, occasionally, an uppercase M appears at the right side of the window name, so the window name looks like this: 1:bash*M I'm pretty sure is because I'm pressing some combination that ...
André Wagner's user avatar
140 votes
3 answers
40k views

vim freezes inside tmux

I’m using split panes in tmux – one being vim, the other being a shell.  Sometimes, around once a day, vim freezes.  I can move between panes, perform any tmux commands, just vim doesn’t react to ...
Ondrej Slinták's user avatar
128 votes
4 answers
92k views

Byobu vs. GNU Screen vs. tmux — usefulness and transferability of skills [closed]

So far I have used Konsole to manage multiple shell sessions but I haven't tried Byobu, GNU Screen, and tmux, which offer better support for multiple shells. They all share one main feature, which is ...
Keitai's user avatar
  • 1,291
128 votes
5 answers
47k 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 to ...
Stevens's user avatar
  • 1,383
128 votes
22 answers
85k views

What's the least conflicting prefix/escape sequence for screen or tmux?

Screen goes with Ctrl+A. tmux on the other hand—as developed within screen—uses Ctrl+B. Both keystrokes, however, are also used in editors, shells, etc. Thus choosing either one degrades ...
124 votes
8 answers
76k 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 ...
GJ.'s user avatar
  • 9,843
115 votes
5 answers
140k views

Selecting text in 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 switches to Vi-like text selecting mode. What am I missing? By the way, is it ...
Mantas's user avatar
  • 1,283
111 votes
5 answers
39k views

How can I make ctrl+left/right keys to move by whole word 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 ...
Llamageddon's user avatar
  • 1,527
108 votes
8 answers
77k 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 ...
winchendonsprings's user avatar
97 votes
2 answers
32k views

How to quickly switch to n.10+ windows in tmux?

Tmux by default comes with the following keybinding to quickly switch between windows numbered 0 to 9: C-b + 0-9 With a couple of dozen different project folders, a few ssh sessions and other ...
glitch's user avatar
  • 1,225
95 votes
1 answer
23k views

On tmux, what is the difference between "bind" and "bind-key"?

On .tmux.conf, what is the difference between "bind" and "bind-key"?
fkreusch's user avatar
  • 1,053
88 votes
7 answers
124k views

Adjusting screen split pane sizes in tmux

I'd like to resize the panes so I can expand / compress the pane sizes (up / down / left / right etc) .. Any way to get this done?
Prashant's user avatar
  • 1,423
88 votes
4 answers
46k views

How to switch between two latest windows in tmux?

GNU Screen has Ctrl-a,Ctrl-a to switch between the two latest windows. How to do it in tmux?
kev's user avatar
  • 12.7k
82 votes
3 answers
131k 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 ...
cjroebuck's user avatar
  • 953
80 votes
1 answer
50k 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 ...
clord's user avatar
  • 903
77 votes
5 answers
24k 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 ...
Ton van den Heuvel's user avatar
76 votes
3 answers
43k views

Transfer current command to a detachable session (tmux/screen)

I'm currently running a backup and it now needs to be transferred to detachable one like on tmux or screen. Is there a way to do this when the command is currently running? I can send the command the ...
Jürgen Paul's user avatar
  • 1,085
73 votes
4 answers
37k views

Move a tmux pane to another session

Short of doing this, is it possible to move a running command in a pane to another tmux session?
HEGX64's user avatar
  • 834
65 votes
2 answers
22k views

How to turn down the timeout between prefix key and command key in tmux?

My ~/.tmux.conf: set -g prefix C-a unbind C-b bind C-a send-prefix bind-key o split-window -v bind-key e split-window -h bind-key w kill-pane (to make the command keys same as GNOME Teminator) ...
quanta's user avatar
  • 1,138
64 votes
6 answers
13k 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 ...
lagsalot's user avatar
  • 771
64 votes
1 answer
65k views

Is it possible to search tmux scrollback history? [duplicate]

I'm starting to use tmux, and I already love it. But if I could search through scrollback history it would be even better (e.g. like in iTerm2). Is there a way to do it as of now?
pms's user avatar
  • 758
64 votes
4 answers
58k views

Attach a tmux session to a remote machine

I am using tmux on my local machine and usually have several sessions simultaneously. What I usually do is I have a session with different windows to work locally and the other sessions in which I ...
lilorox's user avatar
  • 643
63 votes
8 answers
60k views

tmux copy mode - select text block

I'm using tmux with vi keys, and copy/paste works fine as long as you're selecting one line of text, or if you have only one window. When I want to select a block of text (multiple lines, but not full ...
Srećko Toroman's user avatar
60 votes
6 answers
36k 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 ...
Jimm Chen's user avatar
  • 5,884
58 votes
2 answers
34k 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 shortcuts ...
Henrik N's user avatar
  • 1,676
56 votes
6 answers
46k views

Resizing pane is not working for tmux on mac?

After searching through, I figured ctrl+b ( PREFIX ) then ctrl + arrow should resize the current pane. But it is not working. Am I missing anything ? Thanks.
Biswanath's user avatar
  • 707
56 votes
3 answers
30k views

Detach the *other* tmux client(s)

I use tmux when working on my desktop, and then if I want to work outside on my laptop I ssh over to the desktop and attach to the same session. Then when I close my laptop and go back inside, the ...
Paul A Jungwirth's user avatar
56 votes
4 answers
31k 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 ...
Ivan's user avatar
  • 4,509
54 votes
2 answers
11k 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 set-...
holms's user avatar
  • 3,287
54 votes
3 answers
25k 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?
Jeff's user avatar
  • 1,787
51 votes
2 answers
39k views

How to auto resize panes in tmux?

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 same ...
juanpablo's user avatar
  • 7,134
51 votes
3 answers
13k 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 operating systems. How can I make a command conditional to ...
muckabout's user avatar
  • 611
50 votes
6 answers
142k views

tmux Ctrl+B not working

Holding Ctrl and B followed by another command key usually gives me nothing.  I have no .conf file so I'm not overwriting it.
nopcorn's user avatar
  • 16.7k
50 votes
5 answers
81k views

How to delete a detached tmux session?

I detached myself from a tmux session: $ tmux ls 0: 1 windows (created Thu Aug 22 22:52:17 2013) [218x59] Is there anyway I can simply delete it now that I am detached from it?
user784637's user avatar
  • 2,015
50 votes
5 answers
23k 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 ...
jackhab's user avatar
  • 2,970

1
2 3 4 5
23