tmux is a terminal multiplexer: it enables a number of terminals (or windows), each running a separate program, to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached.

learn more… | top users | synonyms

2
votes
1answer
414 views

When you type a search term in copy mode, is there a way to erase the search term with something like CTRL-U?

I enter into copy mode and do a search of the tmux window buffer with /. This works great, except when I want to do a second search, the original search term appears at the search prompt and I have to ...
35
votes
5answers
9k views

Create new-window with current directory in tmux

Is is possible to open a new-window with its working directory set to the one I am currently in. I am using zsh, if it matters.
6
votes
1answer
1k views

Automatically adjust window width in tmux

Is there a way to set tmux so that it automatically adjusts window width when I switch to the pane so that it will be wide axactly as the longest (visible on screen) line in the file I have open? I'm ...
4
votes
2answers
927 views

Terminal and web browser combination

I often use only two applications, terminal and web browser. I like the tmux application which enables to split a terminal window into more regions. I noticed that I can open lynx in another region ...
18
votes
1answer
3k views

How can I tell if I'm in a tmux session from a bash script?

I like to keep my bash_profile in a git repository and clone it to whatever machines I have shell access to. Since I'm in tmux most of the time I have a user@host string in the status line, rather ...
17
votes
6answers
16k views

How can I run a script immediately after connecting via SSH?

I started to ask this question but answered it while I had it open. I'm going to post this question, follow it up with my solution and leave it open to other potential solutions. <backstory> ...
1
vote
1answer
337 views

Tmux viewport caused by multiple concurrent sessions

When attaching to the same tmux sessions from multiple computers using ssh and tmux attach, my screen looks like: ------------------------- $> |........ |........ ...
5
votes
2answers
1k views

Is it possible to run a Vim clientserver instance over SSH+tmux

I've been a vim junkie for a year or so now and I've got some great little tricks burnt in to my memory. I do a lot of development (at the office) in a terminal on Ubuntu. One of the things I value ...
7
votes
1answer
1k views

Is there a tmux shortcut to go read only?

I've been using screen for years now as a way of ensuring that any remote work is safely kept open in after disconnects/crashes. In fact, as a matter of course, I use screens even when working ...
4
votes
3answers
1k views

Scrollability of text when using tmux?

Scrollability of text in some terminals: | tty | xterm | urxvt | guake | terminator screen | Y | Y | Y | Y | Y tmux | N | N | Y | N | N I notice in this ...
4
votes
1answer
1k views

Running several commands in a screen-split

I have a few long running commands that I would like to run together in the same screen (same tab in the terminal app). My current setup is like this: tmux new-session -d 'cmd1' tmux split-window ...
7
votes
2answers
5k views

How do I bind to Shift+{Left,Right} in tmux?

I'm looking at tmux from screen, and have hit a bump while configuring the (highly configurable!) tmux key bindings. Problem is, in my .screenrc I have bindkey ^[[d prev bindkey ^[[c next bindkey ...
22
votes
3answers
7k views

Is there an equivalent of GNU Screen's “log” command in tmux?

I make heavy use of screen's "log" command to log the output of a session to a file, when I am making changes in a given environment. I searched through tmux's man page, but couldn't find an ...
50
votes
4answers
11k views

What are other ways to share a tmux session between two users?

I'm looking for a clean and easy way to share a tmux session with another user on the same machine. I've tried the -S socket-path option, but it requires opening up all permissions of the socket-path ...
4
votes
3answers
934 views

`$XAUTHORITY` appears from 'nowhere' on su+tmux

When I switched from su+bash to su+tmux+zsh I noticed that I get $XAUTHORITY variable defined as /root/.xauthXXXXXX where XXXXXX are 6 random alphanumeric characters. With previous configuration X ...
11
votes
4answers
4k views

How do I bind the tmux prefix to a Super?

I find even Ctrl+b to be very emacs like but I understand the point. I'm wondering if I could bind it to a single keypress of a key I don't other wise use? namely Super_L (also known as the left ...
54
votes
2answers
29k views

Getting 256 colors to work in tmux

I have 256 colors working just fine in konsole,. I thought I'd give tmux a try because, unlike screen, it seems to support vi mode. However I find that the colors of my prompt show up and this is ...
122
votes
10answers
24k views

tmux vs. GNU Screen

Browsing through questions I found about tmux (I normally used GNU Screen). My question is what are pros and cons of each of them. Especially I couldn't find much about tmux.