<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Linux on Dhika Anbiya</title><link>http://anbiya.my.id/tags/linux/</link><description>Recent content in Linux on Dhika Anbiya</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Wed, 25 Mar 2026 14:25:49 +0100</lastBuildDate><atom:link href="http://anbiya.my.id/tags/linux/index.xml" rel="self" type="application/rss+xml"/><item><title>Tmux Cheatsheet</title><link>http://anbiya.my.id/post/tmux-cheat-sheet/</link><pubDate>Wed, 25 Mar 2026 14:25:49 +0100</pubDate><guid>http://anbiya.my.id/post/tmux-cheat-sheet/</guid><description>&lt;p&gt;Stop juggling terminal tabs and start using tmux. This command integrates the terminal multiplexer into your daily routine, offering a seamless way to tile windows, script your environment, and maintain session persistence. It’s the essential tool for anyone looking to maximize their screen real estate and command-line mastery&lt;/p&gt;
&lt;h2 id="sessions"&gt;Sessions
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;tmux&lt;/code&gt; — Start a new session&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tmux new -s mysession&lt;/code&gt; — Start a new session with the name &lt;code&gt;mysession&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tmux ls&lt;/code&gt; — List all running sessions&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tmux a&lt;/code&gt; — Attach to the last session&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tmux a -t mysession&lt;/code&gt; — Attach to a specific session by name&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b d&lt;/code&gt; — Detach from the current session&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b s&lt;/code&gt; — Show all sessions (interactive list)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b \$&lt;/code&gt; — Rename the current session&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tmux kill-session -t mysession&lt;/code&gt; — Kill/delete a specific session&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tmux kill-server&lt;/code&gt; — Kill the tmux server and all sessions&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="windows-tabs"&gt;Windows (Tabs)
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b c&lt;/code&gt; — Create a new window&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b ,&lt;/code&gt; — Rename the current window&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b &amp;amp;&lt;/code&gt; — Close the current window (with confirmation)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b n&lt;/code&gt; — Go to the next window&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b p&lt;/code&gt; — Go to the previous window&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b 0-9&lt;/code&gt; — Switch to window by number&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b w&lt;/code&gt; — List all windows in the current session&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b f&lt;/code&gt; — Find a window by name&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="panes-splits"&gt;Panes (Splits)
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b %&lt;/code&gt; — Split the current pane vertically (left/right)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b &amp;quot;&lt;/code&gt; — Split the current pane horizontally (top/bottom)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b o&lt;/code&gt; — Cycle through panes&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b q&lt;/code&gt; — Show pane numbers (type the number to jump to that pane)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b x&lt;/code&gt; — Kill the current pane&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b z&lt;/code&gt; — Toggle pane zoom (maximize/restore)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b !&lt;/code&gt; — Convert the current pane into a new window&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b \{&lt;/code&gt; or &lt;code&gt;\}&lt;/code&gt; — Swap the current pane with the previous or next one&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b Space&lt;/code&gt; — Toggle between different pane layouts&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="resizing-panes"&gt;Resizing Panes
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b :&lt;/code&gt; — Enter command mode, then type:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;resize-pane -D&lt;/code&gt; — Resize down&lt;/li&gt;
&lt;li&gt;&lt;code&gt;resize-pane -U&lt;/code&gt; — Resize up&lt;/li&gt;
&lt;li&gt;&lt;code&gt;resize-pane -L&lt;/code&gt; — Resize left&lt;/li&gt;
&lt;li&gt;&lt;code&gt;resize-pane -R&lt;/code&gt; — Resize right&lt;/li&gt;
&lt;li&gt;&lt;code&gt;resize-pane -D 10&lt;/code&gt; — Resize down by 10 cells&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b&lt;/code&gt; + &lt;code&gt;Arrow Keys&lt;/code&gt; (hold Ctrl) — Resize pane incrementally&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="copy-mode-vi-mode"&gt;Copy Mode (Vi Mode)
&lt;/h2&gt;&lt;p&gt;To enable vi keys, add &lt;code&gt;setw -g mode-keys vi&lt;/code&gt; to your &lt;code&gt;.tmux.conf&lt;/code&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b \[&lt;/code&gt; — Enter copy mode&lt;/li&gt;
&lt;li&gt;&lt;code&gt;q&lt;/code&gt; — Exit copy mode&lt;/li&gt;
&lt;li&gt;&lt;code&gt;g&lt;/code&gt; — Go to the top&lt;/li&gt;
&lt;li&gt;&lt;code&gt;G&lt;/code&gt; — Go to the bottom&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Space&lt;/code&gt; — Begin selection&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Enter&lt;/code&gt; — Copy selection&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b \]&lt;/code&gt; — Paste the most recently copied buffer&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/&lt;/code&gt; — Search forward&lt;/li&gt;
&lt;li&gt;&lt;code&gt;?&lt;/code&gt; — Search backward&lt;/li&gt;
&lt;li&gt;&lt;code&gt;n&lt;/code&gt; — Next search match&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="miscellaneous"&gt;Miscellaneous
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b t&lt;/code&gt; — Show a large digital clock&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b ?&lt;/code&gt; — List all key bindings&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+b :&lt;/code&gt; — Enter the tmux command prompt&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:setw synchronize-panes&lt;/code&gt; — Toggle &amp;ldquo;Sync Panes&amp;rdquo; (send input to all panes in the window)&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>