<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Tmux on Mike&#39;s Blog</title>
        <link>https://mikerossiter.tech/tags/tmux/</link>
        <description>Recent content in Tmux on Mike&#39;s Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-gb</language>
        <lastBuildDate>Thu, 03 Apr 2025 13:04:14 +0100</lastBuildDate><atom:link href="https://mikerossiter.tech/tags/tmux/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>Tmux</title>
        <link>https://mikerossiter.tech/posts/tmux/</link>
        <pubDate>Mon, 26 Sep 2022 08:58:03 +0100</pubDate>
        
        <guid>https://mikerossiter.tech/posts/tmux/</guid>
        <description>&lt;img src="https://mikerossiter.tech/panes.png" alt="Featured image of post Tmux" /&gt;&lt;h1 id=&#34;tmux&#34;&gt;TMUX
&lt;/h1&gt;&lt;h2 id=&#34;split-your-terminal-screen-up&#34;&gt;Split your terminal screen up!
&lt;/h2&gt;&lt;p&gt;Here is my brief get up and go guide to Tmux. &lt;a class=&#34;link&#34; href=&#34;https://github.com/tmux/tmux&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Tmux&lt;/a&gt; is a great tool to use when you need multiple panes in the terminal and especially useful if you don&amp;rsquo;t have access to a GUI. You can also create sessions with Tmux to enter and exit different workspaces. It can be installed in the usual fashion (apt, pacman, dnf, snap even) on all Linux distros as it is widely used.&lt;/p&gt;
&lt;p&gt;Here is how Tmux appears:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://mikerossiter.tech/Tmux-sample.png&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Tmux hard at work&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;Currently, I prefer to use &lt;a class=&#34;link&#34; href=&#34;https://terminator.readthedocs.io/en/latest/index.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Terminator&lt;/a&gt; on my distro of choice so I don&amp;rsquo;t use Tmux as much as I used to but nonetheless I still find myself using it regularly. Below are some of the commands you can use to create and use separate &lt;em&gt;panes&lt;/em&gt;. Preceding most commands is Ctrl+B. This is sometimes referred to as the prefix. It will initiate a mode that is followed by key inputs that can amend the current view:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Ctrl+B Shift+% - split pane vertically
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Ctrl+B Shift+&amp;#34; - split pane horizontally
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Ctrl+B then arrow to change pane
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Ctrl+B c - New window (number at bottom. Starts at 0)
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Ctrl+B 0 - Go to window 0
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Ctrl+B 1 - Go to window 1
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Ctrl+B z - Zoom window to fullscreen and back again
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Type &amp;#34;exit&amp;#34; or Ctrl + D to close the current pane
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Sessions:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Ctrl+B d - Detach or leave session
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;tmux ls - Summary of windows open in background
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;tmux attach -t 0 - Attach to session (State is preserved)
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;tmux rename-session -t 0 git - Rename the session &amp;#39;git&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;tmux kill-session -t git - Ends git session
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;One of the most useful commands is this:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Ctrl+B : set synchronize-panes on - Sync all panes 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This way you can enter text into all panes at once. Super handy!&lt;/p&gt;
&lt;p&gt;There is much more to Tmux. You can edit the config file in your home directory and use plugins. It is extremely versatile. I might follow this up soon. Some of my config dotfiles are available in my &lt;a class=&#34;link&#34; href=&#34;https://gitlab.com/mikerossiter/dotfiles&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;GitLab&lt;/a&gt; repo if you are interested in some examples of how I set up my terminal.&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
