<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pttlink.org/index.php?action=history&amp;feed=atom&amp;title=Tmux</id>
	<title>Tmux - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pttlink.org/index.php?action=history&amp;feed=atom&amp;title=Tmux"/>
	<link rel="alternate" type="text/html" href="https://wiki.pttlink.org/index.php?title=Tmux&amp;action=history"/>
	<updated>2026-05-09T19:16:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.5</generator>
	<entry>
		<id>https://wiki.pttlink.org/index.php?title=Tmux&amp;diff=2470&amp;oldid=prev</id>
		<title>Kg7qin at 06:40, 13 March 2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.pttlink.org/index.php?title=Tmux&amp;diff=2470&amp;oldid=prev"/>
		<updated>2021-03-13T06:40:14Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:40, 13 March 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l4&quot; &gt;Line 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Quick cheat sheet of helpful tmux commands=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Quick cheat sheet of helpful tmux commands=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Source: &amp;lt;ref&amp;gt;https://gist.github.com/dusenberrymw/638359ea1ce409a2232375edb4a99948&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Source: &amp;lt;ref &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;name=&amp;quot;Github-1&amp;quot;&lt;/ins&gt;&amp;gt;https://gist.github.com/dusenberrymw/638359ea1ce409a2232375edb4a99948&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;lt;code&amp;gt;tmux new&amp;lt;/code&amp;gt; - Create and attach to a new session.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;lt;code&amp;gt;tmux new&amp;lt;/code&amp;gt; - Create and attach to a new session.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;lt;code&amp;gt;tmux new -s NAME_HERE&amp;lt;/code&amp;gt; - Create and attach to a new session named NAME_HERE.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;lt;code&amp;gt;tmux new -s NAME_HERE&amp;lt;/code&amp;gt; - Create and attach to a new session named NAME_HERE.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l28&quot; &gt;Line 28:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 28:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;lt;code&amp;gt;CTRL-b, 3&amp;lt;/code&amp;gt; - Switch to window 3.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;lt;code&amp;gt;CTRL-b, 3&amp;lt;/code&amp;gt; - Switch to window 3.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;lt;code&amp;gt;CTRL-b, CTRL-b, COMMAND&amp;lt;/code&amp;gt; - Send the command to a nested tmux session (repeat prefix for each level of nesting).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;lt;code&amp;gt;CTRL-b, CTRL-b, COMMAND&amp;lt;/code&amp;gt; - Send the command to a nested tmux session (repeat prefix for each level of nesting).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=Dump live tmux buffer to a file=&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Source: &amp;lt;ref name=&amp;quot;Github-1&amp;quot; /&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# &amp;lt;code&amp;gt;CTRL-b,&amp;lt;/code&amp;gt; - to enter the command mode&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# &amp;lt;code&amp;gt;capture-pane -S -32768 ; save-buffer FILENAME_HERE&amp;lt;/code&amp;gt; - to save at least the last 32,768 lines from the buffer&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Configuration file additions=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Configuration file additions=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l107&quot; &gt;Line 107:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 113:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       tmux send-keys Enter&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       tmux send-keys Enter&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=Reload tmux configuration=&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Source: &amp;lt;ref name=&amp;quot;Github-1&amp;quot; /&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    tmux source-file ~/.tmux.conf&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=References=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=References=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;references /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;references /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki:diff::1.12:old-2469:rev-2470 --&gt;
&lt;/table&gt;</summary>
		<author><name>Kg7qin</name></author>
	</entry>
	<entry>
		<id>https://wiki.pttlink.org/index.php?title=Tmux&amp;diff=2469&amp;oldid=prev</id>
		<title>Kg7qin at 06:35, 13 March 2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.pttlink.org/index.php?title=Tmux&amp;diff=2469&amp;oldid=prev"/>
		<updated>2021-03-13T06:35:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:35, 13 March 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:How to]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Administration]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This page is for collecting various snippets and pieces for use with tmux.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This page is for collecting various snippets and pieces for use with tmux.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki:diff::1.12:old-2468:rev-2469 --&gt;
&lt;/table&gt;</summary>
		<author><name>Kg7qin</name></author>
	</entry>
	<entry>
		<id>https://wiki.pttlink.org/index.php?title=Tmux&amp;diff=2468&amp;oldid=prev</id>
		<title>Kg7qin: Created initial page.</title>
		<link rel="alternate" type="text/html" href="https://wiki.pttlink.org/index.php?title=Tmux&amp;diff=2468&amp;oldid=prev"/>
		<updated>2021-03-13T06:34:51Z</updated>

		<summary type="html">&lt;p&gt;Created initial page.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This page is for collecting various snippets and pieces for use with tmux.&lt;br /&gt;
&lt;br /&gt;
=Quick cheat sheet of helpful tmux commands=&lt;br /&gt;
Source: &amp;lt;ref&amp;gt;https://gist.github.com/dusenberrymw/638359ea1ce409a2232375edb4a99948&amp;lt;/ref&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;tmux new&amp;lt;/code&amp;gt; - Create and attach to a new session.&lt;br /&gt;
# &amp;lt;code&amp;gt;tmux new -s NAME_HERE&amp;lt;/code&amp;gt; - Create and attach to a new session named NAME_HERE.&lt;br /&gt;
# &amp;lt;code&amp;gt;CTRL-b, d&amp;lt;/code&amp;gt; - Detach (i.e. exit) from the currently-opened tmux session (alternatively, `tmux detach`).  Note, this means press and hold `CTRL`, press `b`, release both, press `d`.&lt;br /&gt;
# &amp;lt;code&amp;gt;tmux ls&amp;lt;/code&amp;gt; - Show list of tmux sessions.&lt;br /&gt;
# &amp;lt;code&amp;gt;tmux a&amp;lt;/code&amp;gt; - Attach to the previously-opened tmux session.&lt;br /&gt;
# &amp;lt;code&amp;gt;tmux a -t NAME_HERE&amp;lt;/code&amp;gt; - Attach to the tmux session named NAME_HERE.&lt;br /&gt;
# &amp;lt;code&amp;gt;CTRL-d&amp;lt;/code&amp;gt; - Delete (i.e. kill) currently-opened tmux session (alternatively `tmux kill-session`).&lt;br /&gt;
# &amp;lt;code&amp;gt;CTRL-b, [&amp;lt;/code&amp;gt; - Enter copy mode, and enable scrolling in currently-opened tmux session. Press `q` to exit.&lt;br /&gt;
# &amp;lt;code&amp;gt;CTRL-b, &amp;quot;&amp;lt;/code&amp;gt; - Split window horizontally (i.e. split and add a pane below).&lt;br /&gt;
# &amp;lt;code&amp;gt;CTRL-b, %&amp;lt;/code&amp;gt; - Split window vertically (i.e. split and add a pane to the right).&lt;br /&gt;
# &amp;lt;code&amp;gt;CTRL-b, UpArrow&amp;lt;/code&amp;gt; - Move to the pane above (I prefer to rebind this to `CTRL-b, k` to be similar to Vim).&lt;br /&gt;
# &amp;lt;code&amp;gt;CTRL-b, DownArrow&amp;lt;/code&amp;gt; - Move to the pane below (I prefer to rebind this to `CTRL-b, j` to be similar to Vim).&lt;br /&gt;
# &amp;lt;code&amp;gt;CTRL-b, LeftArrow&amp;lt;/code&amp;gt; - Move to the pane to the left (I prefer to rebind this to `CTRL-b, h` to be similar to Vim).&lt;br /&gt;
# &amp;lt;code&amp;gt;CTRL-b, RightArrow&amp;lt;/code&amp;gt; - Move to the pane to the right (I prefer to rebind this to `CTRL-b, l` to be similar to Vim).&lt;br /&gt;
# &amp;lt;code&amp;gt;CTRL-b, z&amp;lt;/code&amp;gt; - Toggle maximization of current pane.&lt;br /&gt;
# &amp;lt;code&amp;gt;CTRL-b, ESC, 2&amp;lt;/code&amp;gt; - Resize all panes to equal size.&lt;br /&gt;
# &amp;lt;code&amp;gt;CTRL-b, q&amp;lt;/code&amp;gt; - Show pane numbers.&lt;br /&gt;
# &amp;lt;code&amp;gt;CTRL-b, x&amp;lt;/code&amp;gt; - Kill current pane.&lt;br /&gt;
# &amp;lt;code&amp;gt;CTRL-b, c&amp;lt;/code&amp;gt; - Create a new window.&lt;br /&gt;
# &amp;lt;code&amp;gt;CTRL-b, n&amp;lt;/code&amp;gt; - Switch to next window.&lt;br /&gt;
# &amp;lt;code&amp;gt;CTRL-b, p&amp;lt;/code&amp;gt; - Switch to previous window.&lt;br /&gt;
# &amp;lt;code&amp;gt;CTRL-b, 3&amp;lt;/code&amp;gt; - Switch to window 3.&lt;br /&gt;
# &amp;lt;code&amp;gt;CTRL-b, CTRL-b, COMMAND&amp;lt;/code&amp;gt; - Send the command to a nested tmux session (repeat prefix for each level of nesting).&lt;br /&gt;
&lt;br /&gt;
=Configuration file additions=&lt;br /&gt;
&lt;br /&gt;
==Alt arrow keys==&lt;br /&gt;
Use Alt-arrow keys without prefix key to switch panes&amp;lt;ref name=&amp;quot;Reddit-1&amp;quot;&amp;gt;https://www.reddit.com/r/tmux/comments/5cm2ca/post_you_favourite_tmux_tricks_here/d9y6jzu/?context=3&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    bind -n M-Left select-pane -L&lt;br /&gt;
    bind -n M-Right select-pane -R&lt;br /&gt;
    bind -n M-Up select-pane -U&lt;br /&gt;
    bind -n M-Down select-pane -D&lt;br /&gt;
&lt;br /&gt;
Shift + arrow keys to switch windows&amp;lt;ref name=&amp;quot;Reddit-1&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    bind -n S-Left  previous-window&lt;br /&gt;
    bind -n S-Right next-window&lt;br /&gt;
&lt;br /&gt;
==Zoom window==&lt;br /&gt;
Zoom Window - Useful for when you need to copy text out of a pane to your local clipboard without selecting text in other panes.&amp;lt;ref name=&amp;quot;Reddit-1&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    unbind !&lt;br /&gt;
    bind ! \&lt;br /&gt;
      new-window -d -n tmux-zoom 'clear &amp;amp;&amp;amp; echo TMUX ZOOM &amp;amp;&amp;amp; read' \;\&lt;br /&gt;
      swap-pane -s tmux-zoom.0 \;\&lt;br /&gt;
      select-window -t tmux-zoom&lt;br /&gt;
    &lt;br /&gt;
    unbind `&lt;br /&gt;
    bind ` \&lt;br /&gt;
      last-window \;\&lt;br /&gt;
      swap-pane -s tmux-zoom.0 \;\&lt;br /&gt;
      kill-window -t tmux-zoom&lt;br /&gt;
&lt;br /&gt;
==Sync panes==&lt;br /&gt;
Sync panes (Send input to all panes in the window). When enabled, pane borders become red as an indication.&amp;lt;ref name=&amp;quot;Reddit-1&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    bind-key y set-window-option synchronize-panes on \;\&lt;br /&gt;
      set-window-option pane-active-border-style fg=red \;\&lt;br /&gt;
      set-window-option pane-border-style fg=yellow \;\&lt;br /&gt;
      display-message &amp;quot;Sync panes ON&amp;quot;&lt;br /&gt;
    bind-key Y set-window-option synchronize-panes off \;\&lt;br /&gt;
      set-window-option pane-active-border-style fg=green \;\&lt;br /&gt;
      set-window-option pane-border-style default \;\&lt;br /&gt;
      display-message &amp;quot;Sync panes OFF&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Bash Multi Command (works with panes)==&lt;br /&gt;
Source: &amp;lt;ref name=&amp;quot;Reddit-1&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Works with tmux sync panes and spawns a new per argument and then sync them.&lt;br /&gt;
&lt;br /&gt;
Useful for running ssh to multiple machines at same time, or issuing multiple commands at once.&lt;br /&gt;
&lt;br /&gt;
Try it with:&lt;br /&gt;
&lt;br /&gt;
    multi ping 127.0.0.{1..10}&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
    multi ssh server{1..5}&lt;br /&gt;
&lt;br /&gt;
Configuration snippet:&lt;br /&gt;
&lt;br /&gt;
    function multi {&lt;br /&gt;
      cmd=$1&lt;br /&gt;
      shift&lt;br /&gt;
      while [[ $cmd = &amp;quot;ssh&amp;quot; ]]; do&lt;br /&gt;
        pre_check=&amp;quot;$(echo $@ | tr ' ' '\n' | sed -e 's/^.*@//g' | \&lt;br /&gt;
                     xargs nmap -p 22 -PN -oG - | grep Port | grep -v open)&amp;quot;&lt;br /&gt;
        test &amp;quot;${pre_check}x&amp;quot; != &amp;quot;x&amp;quot; &amp;amp;&amp;amp; (clear; echo &amp;quot;$pre_check&amp;quot;) || break&lt;br /&gt;
      done&lt;br /&gt;
      tmux send-keys -t 0 &amp;quot;$cmd ${@[1]}&amp;quot;&lt;br /&gt;
      for ((pane = 1; pane &amp;lt; ${#@[@]}; pane++)); do&lt;br /&gt;
        tmux splitw -h&lt;br /&gt;
        tmux send-keys -t $pane &amp;quot;$cmd ${@[pane+1]}&amp;quot;&lt;br /&gt;
        tmux select-layout tiled &amp;gt; /dev/null&lt;br /&gt;
      done&lt;br /&gt;
      tmux set-window-option synchronize-panes on &amp;gt; /dev/null&lt;br /&gt;
      tmux set-window-option pane-active-border-style fg=red &amp;gt; /dev/null&lt;br /&gt;
      tmux set-window-option pane-border-style fg=yellow &amp;gt; /dev/null&lt;br /&gt;
      tmux send-keys Enter&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kg7qin</name></author>
	</entry>
</feed>