{"id":78500,"date":"2023-02-17T14:06:59","date_gmt":"2023-02-17T14:06:59","guid":{"rendered":"\/tutorials\/?p=78500"},"modified":"2025-04-27T19:28:10","modified_gmt":"2025-04-27T19:28:10","slug":"tmux-config","status":"publish","type":"post","link":"\/tutorials\/tmux-config\/","title":{"rendered":"Tmux config: understanding the configuration file + customization examples"},"content":{"rendered":"<p>tmux is a popular terminal multiplexer that lets you run multiple sessions inside a single window. What is more, users can easily switch between these sessions, detaching or reattaching them.&nbsp;<\/p><p>Besides features that tmux offers by default, you can customize it further to suit your projects.<\/p><p>In this tutorial, we&rsquo;ll explain how exactly you can benefit from customizing tmux and review its config options.<\/p><p class=\"has-text-align-center\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/tmux-Cheat-Sheet.pdf\" target=\"_blank\" rel=\"noopener\">Download comprehensive tmux cheat sheet<\/a><\/p><p>\n\n\n\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-tmux-config-file-nbsp\">tmux Config File&nbsp;<\/h2><p>You can configure the tmux environment with the help of a system configuration file. To use it, log in to your hosted virtual server via <a href=\"\/tutorials\/ssh-tutorial-how-does-ssh-work\/\">SSH<\/a> and create the <strong>tmux.conf<\/strong> file. You can do so via <a href=\"\/tutorials\/how-to-use-putty-ssh\/\">PuTTY SSH<\/a>. Then, add the preferred configuration commands to it.<\/p><p>Alternatively, you can easily connect to SSH via our browser-based terminal, eliminating the need for additional software:<\/p><figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/03\/hpanel-vps-overview-vpsinformation-browserterminal-highlighted.png\"><img decoding=\"async\" width=\"1024\" height=\"732\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/03\/hpanel-vps-overview-vpsinformation-browserterminal-highlighted.png\/w=1024,h=1024,fit=scale-down\" alt=\"The VPS information page on hPanel. The Browser terminal window is highlighted\" class=\"wp-image-87084\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/03\/hpanel-vps-overview-vpsinformation-browserterminal-highlighted.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/03\/hpanel-vps-overview-vpsinformation-browserterminal-highlighted.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/03\/hpanel-vps-overview-vpsinformation-browserterminal-highlighted.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/03\/hpanel-vps-overview-vpsinformation-browserterminal-highlighted.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><p>Note that configuration can be either global or local, depending on the file&rsquo;s location. If you need&nbsp;a local configuration file, create it in the home directory using the <a href=\"\/tutorials\/linux-touch-command\/\">Linux touch command<\/a>:<\/p><pre class=\"wp-block-preformatted\">touch ~\/.tmux.conf<\/pre><p>On the other hand, if you want to make a global tmux configuration file, place it in the <strong>\/etc<\/strong> directory:<\/p><pre class=\"wp-block-preformatted\">touch \/etc\/tmux.conf<\/pre><p>Now, add the preferred configuration to the <strong>tmux.conf<\/strong> file. After that, save the file and exit the text editor. The changes will take effect the next time you launch tmux.<\/p><h2 class=\"wp-block-heading\" id=\"h-tmux-configuration-options\">tmux Configuration Options<\/h2><p>tmux has several key bindings and functions that may not suit all users. By configuring tmux, you can customize key bindings and different functions to align with your workflow and preferences.<\/p><p>In addition to key bindings and options, you can change your tmux terminal&rsquo;s appearance. For example, customize its color scheme or set a background color.<\/p><p>Lastly, users can set up custom scripts or commands to run when tmux starts. This can be useful for personal <a href=\"\/tutorials\/development-environment\/\">development environments<\/a>, helping you automate certain tasks and ensuring you won&rsquo;t lose any work.&nbsp;&nbsp;<\/p><p>Let&rsquo;s take a deeper look at the three main configuration categories:<\/p><p><strong>Server and Session Options<\/strong><\/p><p>You should set server options when starting the tmux server, as they affect all sessions. Examples of server options include:<\/p><ul class=\"wp-block-list\">\n<li>Default terminal type<\/li>\n\n\n\n<li>Maximum number of sessions<\/li>\n\n\n\n<li>Location of the socket for connecting to the tmux server<\/li>\n<\/ul><p>Use the <strong>set-option -s <\/strong>command to apply server options.&nbsp;<\/p><p>Meanwhile, session options affect the behavior of a particular session. Some of the most common session options are:<\/p><ul class=\"wp-block-list\">\n<li>Name of the sessions<\/li>\n\n\n\n<li>Initial working directory<\/li>\n\n\n\n<li>Default window layout<\/li>\n<\/ul><p>To set session options, opt for the <strong>set-option <\/strong>command.<\/p><p>\n\n\n        <div class=\"protip\">\n            <div class=\"protip__heading\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                    <path d=\"M1.49234 23.5024C1.23229 23.5024 0.972242 23.4024 0.782206 23.2123C0.562165 22.9923 0.452144 22.6822 0.502153 22.3722C0.562165 21.9221 1.14227 17.9113 3.00262 16.351C3.63274 15.8209 4.43289 15.5509 5.26305 15.5609C6.09321 15.5909 6.87335 15.9109 7.47347 16.4911C8.6937 17.6913 8.76371 19.6717 7.6435 20.9919C6.0832 22.8523 2.08245 23.4324 1.63237 23.4924C1.59236 23.4924 1.54235 23.4924 1.50234 23.4924L1.49234 23.5024ZM5.16303 17.5613C4.84297 17.5613 4.53291 17.6713 4.29287 17.8813C3.60274 18.4614 3.07264 19.9317 2.75258 21.242C4.06282 20.9219 5.5331 20.3918 6.11321 19.7017C6.55329 19.1716 6.54329 18.3814 6.0832 17.9213C5.85316 17.7013 5.5431 17.5713 5.20304 17.5613C5.19304 17.5613 5.17303 17.5613 5.16303 17.5613ZM11.7243 21.8821C11.4942 21.8821 11.2642 21.8021 11.0841 21.652C10.8541 21.462 10.7241 21.1819 10.7241 20.8819V15.9109L8.08358 13.2705H3.11264C2.81259 13.2705 2.53254 13.1404 2.3425 12.9104C2.15246 12.6803 2.07245 12.3803 2.12246 12.0902C2.19247 11.7102 2.84259 8.36953 4.70294 7.12929C6.33325 6.04909 8.96375 6.49918 10.244 6.80923C11.5442 4.96889 13.2546 3.4286 15.2349 2.33839C17.4553 1.11816 19.9858 0.518051 22.4963 0.498047C23.0464 0.498047 23.4865 0.948132 23.4865 1.49824C23.4865 5.0389 22.3763 9.97983 17.1753 13.7605C17.4853 15.0408 17.9354 17.6613 16.8552 19.2816C15.615 21.1419 12.2744 21.7921 11.8943 21.8621C11.8343 21.8721 11.7743 21.8821 11.7143 21.8821H11.7243ZM12.7245 16.181V19.6016C13.7146 19.2916 14.7948 18.7915 15.2049 18.1814C15.675 17.4812 15.605 16.091 15.385 14.9008C14.5248 15.3808 13.6346 15.8109 12.7245 16.181ZM9.66388 12.0302L11.9643 14.3307C13.1845 13.8306 14.3648 13.2204 15.485 12.5103C19.9358 9.51974 21.2361 5.60901 21.4561 2.53843C19.6157 2.67846 17.8254 3.20856 16.2051 4.09872C14.2847 5.14892 12.6544 6.68921 11.4942 8.54956C10.7841 9.65977 10.174 10.82 9.66388 12.0302ZM4.39289 11.2701H7.81353C8.1936 10.3599 8.63368 9.46974 9.11377 8.60957C7.92355 8.38953 6.51329 8.31952 5.81315 8.78961C5.19304 9.19968 4.70294 10.3099 4.39289 11.2701Z\" fill=\"#673DE6\"\/>\n                <\/svg>\n                <p class=\"protip__title\">\n                    Suggested Reading                <\/p>\n            <\/div>\n            <p class=\"protip__content\"><a href=\"\/tutorials\/what-is-vps-hosting\/\">VPS Hosting: Everything You Need to Know About Virtual Private Servers<\/a><br>\n<a href=\"\/tutorials\/vps-security\/\">15 VPS Security Tips to Prevent Attacks on Your Server<\/a> <\/p>\n                    <\/div>\n        \n\n\n\n<\/p><p><strong>User Options<\/strong><\/p><p>With tmux, users can set custom settings, which can modify the pane, window, session, or server options. Keep in mind that all user options are strings and must be prefixed with the <strong>@<\/strong> symbol. Additionally, user options can store custom values from scripts.<\/p><p><strong>Window and Pane Options<\/strong><\/p><p>tmux provides many configuration options that allow users to customize the appearance of its windows and panes. What&rsquo;s more, pane options can be inherited from the window options. As a result, users can set any pane option as a window option, and tmux will apply the configuration to all panes.&nbsp;&nbsp;<\/p><h2 class=\"wp-block-heading\" id=\"h-tmux-configuration-examples\">tmux Configuration Examples<\/h2><p>Let&rsquo;s look at some of the most popular tmux configuration examples.&nbsp;&nbsp;<\/p><h3 class=\"wp-block-heading\" id=\"h-change-the-default-prefix\">Change the Default Prefix<\/h3><p>One of the most important configuration options of tmux is the prefix. The default prefix key binding is <strong>Ctrl<\/strong> <strong>+ B<\/strong>. To send a command to tmux, users need to press <strong>Ctrl + B<\/strong>, and then the wanted command.<\/p><p>The prefix key is easily configurable. In this example, we will change the prefix from <strong>Ctrl + B <\/strong>to <strong>Ctrl + A<\/strong>. To do this, open the tmux configuration file with the preferred text editor:<\/p><pre class=\"wp-block-preformatted\">sudo nano ~\/tmux.conf<\/pre><p>Then paste the following code:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Change prefix from 'Ctrl+B' to 'Ctrl+A'\nunbind C-b\nset-option -g prefix C-a\nbind-key C-a send-prefix<\/pre><p>Save the changes and start a new tmux session.&nbsp;<\/p><h3 class=\"wp-block-heading\" id=\"h-use-the-mouse-mode\">Use the Mouse Mode<\/h3><p>The mouse mode lets users use their mouse to interact with tmux windows and panes. Once it is enabled, users can resize windows and panes and scroll through the output of tmux sessions.&nbsp;<\/p><p>Keep in mind that mouse support is disabled by default. To enable it, open the configuration file:<\/p><pre class=\"wp-block-preformatted\">sudo nano ~\/.tmux.conf<\/pre><p>Then paste this code and save the changes:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Enable mouse mode\nset -g mouse on<\/pre><h3 class=\"wp-block-heading\" id=\"h-set-two-prefixes\">Set Two Prefixes<\/h3><p>It&rsquo;s possible to have multiple prefix keys in tmux. This can be useful if you want to use a different prefix key in various contexts or have a secondary prefix key as a backup.&nbsp;<\/p><p>To illustrate, we will enable <strong>Ctrl + A <\/strong>and <strong>Ctrl + B<\/strong> prefixes. Open the configuration file and add the following tmux commands: &nbsp;<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Enable two prefixes\nset-option -g prefix C-a\nset-option -g prefix2 C-b<\/pre><h3 class=\"wp-block-heading\" id=\"h-change-the-default-server-behavior\">Change the Default Server Behavior<\/h3><p>By default, the tmux server will exit when there are no active sessions. To prevent this, you can disable the <strong>exit-empty<\/strong> option with the following command:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#Disable exit-empty\nset -s exit-empty off<\/pre><h3 class=\"wp-block-heading\" id=\"h-start-counting-window-and-pane-numbers-base-index-at-1\">Start Counting Window and Pane Numbers (Base-Index) At 1<\/h3><p>When starting tmux, you will notice that both window and pane numbers start from zero, which can be inconvenient and confusing. Luckily, it&rsquo;s possible to set the base index to start counting from one. Just add the following code to your tmux configuration file:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Start counting pane and window number at 1\nset -g base-index 1\nsetw -g pane-base-index 1<\/pre><h3 class=\"wp-block-heading\" id=\"h-turn-off-automatic-renaming-globally\">Turn off Automatic Renaming Globally<\/h3><p>Automatic renaming will rename a tmux window using the format specified by the<strong> automatic-rename-format<\/strong> option. To turn off automatic renaming globally in tmux, add the following line to the global configuration file:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Disable automatic renaming\nset-option -wg automatic-rename off<\/pre><p>Save the changes and start a new tmux session.<\/p><h3 class=\"wp-block-heading\" id=\"h-make-the-current-pane-s-background-white\">Make the Current Pane&rsquo;s Background White<\/h3><p>Use the command below to set the background color of the current pane to white:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Change the background color to white\nset -g window-active-style bg=white<\/pre><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/Command-prompt-window-displaying-tmux-configuration-functionality.png\"><img decoding=\"async\" width=\"1192\" height=\"672\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/Command-prompt-window-displaying-tmux-configuration-functionality.png\/w=1024,h=1024,fit=scale-down\" alt=\"Command-prompt window displaying tmux configuration functionality. Multiple panes are active, one of which has a white background color\" class=\"wp-image-79118\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/Command-prompt-window-displaying-tmux-configuration-functionality.png\/w=1192,fit=scale-down 1192w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/Command-prompt-window-displaying-tmux-configuration-functionality.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/Command-prompt-window-displaying-tmux-configuration-functionality.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/Command-prompt-window-displaying-tmux-configuration-functionality.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/Command-prompt-window-displaying-tmux-configuration-functionality.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1192px) 100vw, 1192px\" \/><\/a><\/figure>\n<\/div><p>It&rsquo;s also possible to adjust the pane colors with the following code:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Change pane colors\nset -g pane-active-border fg=red \nset -ag pane-active-border bg=magenta<\/pre><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/Terminal-window-displaying-tmux-panes-functionality.png\"><img decoding=\"async\" width=\"1190\" height=\"668\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/Terminal-window-displaying-tmux-panes-functionality.png\/w=1024,h=1024,fit=scale-down\" alt=\"The terminal window displaying tmux panes functionality. With the help of configuration files, pane border color is now set as magenta\" class=\"wp-image-79120\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/Terminal-window-displaying-tmux-panes-functionality.png\/w=1190,fit=scale-down 1190w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/Terminal-window-displaying-tmux-panes-functionality.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/Terminal-window-displaying-tmux-panes-functionality.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/Terminal-window-displaying-tmux-panes-functionality.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/Terminal-window-displaying-tmux-panes-functionality.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1190px) 100vw, 1190px\" \/><\/a><\/figure>\n<\/div><h2 class=\"wp-block-heading\" id=\"h-how-to-configure-tmux-to-allow-copy-paste-between-system-and-tmux-clipboards\">How to Configure tmux to Allow Copy-Paste Between System and tmux Clipboards<\/h2><p>By default, tmux uses its clipboard for copying and pasting text within a session. It means that users cannot paste text copied from tmux to an outside window.<\/p><p>However, it&rsquo;s possible to configure tmux to allow copy-paste between the system clipboard and tmux clipboard. To do so, consider installing <strong>xclip<\/strong>, which enables the communication between the tmux and system clipboards.<\/p><p>Here are the steps to configure tmux to allow copy-paste:<\/p><p>1. Install <strong>xclip<\/strong>:<\/p><pre class=\"wp-block-preformatted\">sudo apt-get install xclip<\/pre><p>2. Add the following lines to your tmux configuration file:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Use xclip to copy and paste with the system clipboard\nbind C-c run \"tmux save-buffer - | xclip -i -sel clip\"\nbind C-v run \"tmux set-buffer $(xclip -o -sel clip); tmux paste-buffer\"<\/pre><p>This configuration uses <strong>C-c <\/strong>to copy the selected text to the system clipboard and C-v to paste from the system clipboard into tmux.<\/p><p>3. Reload your tmux configuration with the following command:<\/p><pre class=\"wp-block-preformatted\">tmux source-file ~\/.tmux.conf<\/pre><p>After these steps, you will be able to copy and paste text between tmux and the system clipboard. Whenever you press the<strong> prefix<\/strong> followed by <strong>Ctrl + C<\/strong>, <strong>xclip<\/strong> will capture the current tmux buffer. When you want to paste the content, press the<strong> prefix<\/strong> followed by <strong>Ctrl + V<\/strong>. &nbsp;<\/p><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-vps-hosting\" href=\"\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=1024,h=1024,fit=scale-down\" alt=\"\" class=\"wp-image-77934\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>tmux is an excellent tool for any Unix-based server management. Combined with the right configuration options, users can expect to tailor their terminal to match even the highest standards.<\/p><p>In this tutorial, we&rsquo;ve covered the main tmux configuration categories and provided some helpful configuration examples. Additionally, we&rsquo;ve gone through the process of installing <strong>xclip<\/strong>, which enables copy-pasting data between the system and tmux clipboards.&nbsp;<\/p><p>If you have any questions or insights, leave them in the comment section below.<\/p><h2 class=\"wp-block-heading\" id=\"h-tmux-config-faq\">tmux Config FAQ<\/h2><p>Check out these most frequently asked questions about tmux configuration.&nbsp;&nbsp;<\/p><div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1676643121119\"><h3 class=\"schema-faq-question\">Where Is the tmux Config File?<\/h3> <p class=\"schema-faq-answer\">The tmux configuration file is usually located at <strong>~\/.tmux.conf<\/strong>. This file contains a set of commands executed whenever tmux starts up, allowing users to customize it. If the <strong>~\/.tmux.conf<\/strong> file doesn&rsquo;t exist, create it by running the<strong> touch ~\/.tmux.conf<\/strong> command. It will create an empty configuration file that users can edit.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1676643129137\"><h3 class=\"schema-faq-question\">What Is SETW in tmux?<\/h3> <p class=\"schema-faq-answer\">SETW or set-window-option is used to configure various new window options such as mode-keys, synchronize-panes, allow-rename, and main-pane-height.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1676643142354\"><h3 class=\"schema-faq-question\">How to Find a tmux Prefix?<\/h3> <p class=\"schema-faq-answer\">In tmux, the prefix is the combination of keys you press before issuing a command. The default prefix is <strong>Ctrl + B<\/strong>, but it can be customized to be any combination. To find out what the current prefix is, try pressing <strong>Ctrl + B<\/strong>. If it doesn&rsquo;t work, open the <strong>tmux.conf<\/strong> file and look for the <strong>set-option -g prefix<\/strong> line.<\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>tmux is a popular terminal multiplexer that lets you run multiple sessions inside a single window. What is more, users [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/tutorials\/tmux-config\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":279,"featured_media":84309,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to Customize Tmux Using the Config File","rank_math_description":"Tmux uses a file called tmux.conf to store its configuration. Check out this article to learn how to customize Tmux using the config file.","rank_math_focus_keyword":"tmux config","footnotes":""},"categories":[22648,22644],"tags":[],"class_list":["post-78500","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-managing-monitoring-and-security","category-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/tmux-config","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/tmux-config","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/tmux-config","default":0},{"locale":"en-GB","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/tmux-config","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/tmux-config-understanding-the-configuration-file-customization-examples","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/tmux-config-understanding-the-configuration-file-customization-examples","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/tmux-config","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/tmux-config","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/tmux-config","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/tmux-config","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/tmux-config","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/tmux-config","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/tmux-config","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/78500","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/users\/279"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/comments?post=78500"}],"version-history":[{"count":14,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/78500\/revisions"}],"predecessor-version":[{"id":119029,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/78500\/revisions\/119029"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/media\/84309"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/media?parent=78500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/categories?post=78500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/tags?post=78500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}