Questions tagged [tmux]

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.

tmux is intended to be a simple, modern, BSD-licensed alternative to programs such as GNU screen.

When tmux is started it creates a new session with a single window and displays it on screen. A status line at the bottom of the screen shows information on the current session and is used to enter interactive commands.

A session is a single collection of pseudo terminals under the management of tmux. Each session has one or more windows linked to it. A window occupies the entire screen and may be split into rectangular panes, each of which is a separate pseudo terminal


Resources


Related tags

1849 questions
145
votes
14 answers

How to automatically start tmux on SSH session?

I have ten or so servers that I connect to with SSH on a regular basis. Each has an entry in my local computer's ~/.ssh/config file. To avoid losing control of my running process when my Internet connection inevitably drops, I always work inside a…
Alex Ryan
  • 2,427
  • 2
  • 18
  • 15
145
votes
9 answers

Create new tmux session from inside a tmux session

I'm writing a shell script that creates / attaches or switches to a given session, depending on whether one is inside tmux and the session exists. I've got everything working great except for the case requiring the creation of a new tmux session…
Michael Robinson
  • 29,278
  • 12
  • 104
  • 130
141
votes
13 answers

Getting back old copy paste behaviour in tmux, with mouse

This is what I used to do in tmux to copy-paste (using the mouse, the keyboard works differently and it is not what I am interested about): Select text with mouse, left-button pressed Paste text with middle-button I have upgraded my OS, and this…
blueFast
  • 41,341
  • 63
  • 198
  • 344
136
votes
9 answers

Terminal Multiplexer for Microsoft Windows - Installers for GNU Screen or tmux

I am looking for a terminal multiplexer for Microsoft Windows. I was unable to locate the installers for Microsoft Windows for both tmux and GNU Screen. Currently I'm using Putty to connect to my Linux machine from from Windows Machine. Can somebody…
Kamaal
  • 1,361
  • 2
  • 9
  • 3
130
votes
4 answers

Tmux vs. iTerm2 split panes

Why should I use tmux when iterm2 has split panes? I have never used tmux, and want to know if there are advantages to using that in my workflow instead of the split pane features iterm2 has. I really like the dimming of inactive windows that…
pizza247
  • 3,869
  • 7
  • 33
  • 47
127
votes
11 answers

Pane Title in Tmux

On my local machine I've got 3 node.js instances running simultaneously. Each has it's own pane in a tmux window called "servers". The problem is that it's not that easy to figure out which node is running in which pane, 'cause their logs are…
Andrey Lushnikov
  • 3,143
  • 3
  • 22
  • 21
123
votes
5 answers

In tmux can I resize a pane to an absolute value

Is it possible to tell tmux to "resize a pane to 5 lines high"? I know I can do resize-pane -U 3 to move the dividing line, but sometimes when logging in with a different size monitor the size has changed by a lot of lines that I can't judge by eye.…
Hamish Downer
  • 16,603
  • 16
  • 90
  • 84
119
votes
2 answers

Move window between tmux clients

I'm just learning tmux and I have no experience with screen. I'm wondering if I can move a window in one tmux client to another tmux client. I want to move my IRC client to a new window on my screen.
Dustin
  • 3,965
  • 5
  • 27
  • 33
111
votes
17 answers

How to copy to system clipboard from tmux output after mouse selection?

Now for copy to system clipboard I have to select via mouse text in tmux window with Shift key. And then I have to run this command: tmux save-buffer - | reattach-to-user-namespace pbcopy Is any chance to save to system clipboard easier? Key bind…
tomekfranek
  • 6,852
  • 8
  • 45
  • 80
110
votes
5 answers

List running Jupyter notebooks and tokens

How do you check the login tokens for all running jupyter notebook instances? Example: you have a notebook running in tmux or screen permanently, and login in remotely through ssh. Sometimes, particularly if you're logging in after a long time, the…
christopherlovell
  • 3,800
  • 4
  • 19
  • 26
107
votes
1 answer

Specify pane percentage in tmuxinator project

How can I specify a pane percentage in tmuxinator ? Eg: project_name: ad_dev project_root: ~/Programming/WWW/Rails/projects/ApparelDreamDev rvm: ruby-1.9.2-p290@apparel_dev pre: SQL tabs: - editor: layout: main-vertical panes: …
Goles
  • 11,599
  • 22
  • 79
  • 140
106
votes
6 answers

.bashrc/.profile is not loaded on new tmux session (or window) -- why?

When tmux starts or opens a new window, it does not load my .profile or .bashrc. I end up typing . ~/.bashrc every time. Is there a way to make this happen automatically?
John Smith
  • 1,813
  • 4
  • 15
  • 18
106
votes
9 answers

Switch between sessions in tmux?

I'm relatively new to tmux and use it just for local development. In some tmux tutorials, a person will list out their tmux sessions in an enumerated list. There is yellow highlight typically. Does anyone know what I'm talking about and how to do…
iamnotsam
  • 9,470
  • 7
  • 33
  • 30
106
votes
2 answers

How can I reattach to tmux process

I had to reboot my box today. I had several program running in tmux sessions. They seem to be still alive, how can I reattach to them? I tried tmux a processID but it didn't work. /home/me 21$ ps aux | grep tmux me 1299 0.0 0.0 22244 1920 ? …
statquant
  • 13,672
  • 21
  • 91
  • 162
98
votes
6 answers

How to write a shell script that starts tmux session, and then runs a ruby script

I want to write a shell script that does this: First, create a tmux session Second, run a ruby script called "run.rb" INSIDE the tmux session In pseudo-code, what I want to do: tmux new -s my_session ruby run.rb # NOTE: I want this to run…
hackstar15
  • 1,259
  • 1
  • 10
  • 14