{"id":17747,"date":"2026-10-22T17:19:21","date_gmt":"2026-10-22T11:49:21","guid":{"rendered":"https:\/\/www.skynats.com\/blog\/?p=17747"},"modified":"2026-10-22T17:19:21","modified_gmt":"2026-10-22T11:49:21","slug":"how-to-use-tmux","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/how-to-use-tmux\/","title":{"rendered":"How to Install and Use Tmux on Linux"},"content":{"rendered":"<h2><b>Introduction<\/b><\/h2>\n<p>If you work in the terminal a lot, especially SSH, you&#8217;ve probably wanted to run several terminal sessions at once without opening a dozen windows. That&#8217;s exactly what tmux helps with. Tmux is a terminal multiplexer, a tool that helps you split one terminal into multiple panes and windows, and keep sessions running even after you disconnect. It&#8217;s a saviour for System\/DevOps engineers for exactly this reason. This guide helps you learn how to use tmux, install it on major Linux distributions, and cover the commands you&#8217;ll use.<\/p>\n<h2><b>Prerequisites<\/b><\/h2>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">A <span style=\"color: #999999;\"><a style=\"color: #999999;\" href=\"https:\/\/www.linux.org\/\" target=\"_blank\" rel=\"noopener\">Linux<\/a><\/span> system (Ubuntu, Debian, Fedora, RedHat, Arch, Manjaro, or OpenSUSE)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Terminal access with <\/span><span style=\"font-weight: 400;\">sudo<\/span><span style=\"font-weight: 400;\"> privileges<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Basic familiarity with terminal commands<\/span><\/li>\n<\/ul>\n<h2>What Is tmux?<\/h2>\n<p>tmux is a Linux terminal multiplexer that lets you manage multiple terminal sessions, split panes, and keep processes running when you detach from a session. It is useful for developers and system administrators managing remote servers.<\/p>\n<h3><b>Step 1: Install Tmux<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Tmux is available in the default package repositories of almost every Linux distribution:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\"># Ubuntu\/Debian<\/span><\/p>\n<p><span style=\"font-weight: 400;\">sudo apt install tmux\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\"># RedHat\/Fedora<\/span><\/p>\n<p><span style=\"font-weight: 400;\">sudo dnf install tmux<\/span><\/p>\n<p><span style=\"font-weight: 400;\"># Arch\/Manjaro<\/span><\/p>\n<p><span style=\"font-weight: 400;\">sudo pacman -S tmux<\/span><\/p>\n<p><span style=\"font-weight: 400;\"># OpenSUSE<\/span><\/p>\n<p><span style=\"font-weight: 400;\">sudo zypper i tmux<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><b>Step 2: Start a Tmux Session<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Once installed, simply run:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">tmux<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">A green status bar will appear at the bottom of your terminal, confirming you&#8217;re now inside a tmux session.<\/span><\/p>\n<h2><b>Step 3: Split and Navigate Panes<\/b><\/h2>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Split horizontally: <\/span><span style=\"font-weight: 400;\">Ctrl+b<\/span><span style=\"font-weight: 400;\">, then <\/span><span style=\"font-weight: 400;\">&#8220;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Split vertically: <\/span><span style=\"font-weight: 400;\">Ctrl+b<\/span><span style=\"font-weight: 400;\">, then <\/span><span style=\"font-weight: 400;\">%<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Move between panes: <\/span><span style=\"font-weight: 400;\">Ctrl+b<\/span><span style=\"font-weight: 400;\">, then an arrow key<\/span><\/li>\n<\/ul>\n<h2><b>Step 4: Work with Windows<\/b><\/h2>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">New window: <\/span><span style=\"font-weight: 400;\">Ctrl+b<\/span><span style=\"font-weight: 400;\">, then <\/span><span style=\"font-weight: 400;\">c<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Rename window: <\/span><span style=\"font-weight: 400;\">Ctrl+b<\/span><span style=\"font-weight: 400;\">, then <\/span><span style=\"font-weight: 400;\">,<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Next window: <\/span><span style=\"font-weight: 400;\">Ctrl+b<\/span><span style=\"font-weight: 400;\">, then <\/span><span style=\"font-weight: 400;\">n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Previous window: <\/span><span style=\"font-weight: 400;\">Ctrl+b<\/span><span style=\"font-weight: 400;\">, then <\/span><span style=\"font-weight: 400;\">p<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Close window: <\/span><span style=\"font-weight: 400;\">Ctrl+b<\/span><span style=\"font-weight: 400;\">, then <\/span><span style=\"font-weight: 400;\">k<\/span><span style=\"font-weight: 400;\"> (confirm with <\/span><span style=\"font-weight: 400;\">Y<\/span><span style=\"font-weight: 400;\">)<\/span><\/li>\n<\/ul>\n<h3><b>Step 5: Detach and Reattach Sessions<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">To leave a session without closing it, press <\/span><span style=\"font-weight: 400;\">Ctrl+b<\/span><span style=\"font-weight: 400;\">, then <\/span><span style=\"font-weight: 400;\">d<\/span><span style=\"font-weight: 400;\">. Your session keeps running in the background.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">To see all detached sessions:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">tmux ls<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">To reattach:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">tmux a\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 # reattach the most recent session<\/span><\/p>\n<p><span style=\"font-weight: 400;\">tmux attach-session -t 0\u00a0 \u00a0 \u00a0 # reattach a specific session by number<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Need Professional Linux Server Management?<\/h3>\n<p>Managing <a href=\"https:\/\/www.skynats.com\/linux-server-management\">Linux servers<\/a> requires more than running terminal commands. Regular monitoring, security updates, troubleshooting, and maintenance help keep your infrastructure secure and reliable.<\/p>\n<p>Skynats provides <a href=\"https:\/\/www.skynats.com\/blog\/monitorix-linux-server-monitoring-setup-and-configuration-guide\/\">Linux server<\/a> management, 24\/7 monitoring, <a href=\"https:\/\/www.skynats.com\/web-server-hardening\">security hardening<\/a>, and <a href=\"https:\/\/www.skynats.com\/contact-us\">technical support<\/a> for businesses.<\/p>\n<ul>\n<li>\n<div>\n<div>\n<p><a href=\"https:\/\/www.skynats.com\/linux-server-management\">Explore our Linux server management services<\/a><\/p>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<div>\n<div>\n<p><a href=\"https:\/\/www.skynats.com\/contact-us\">Contact Skynats for expert support<\/a><\/p>\n<\/div>\n<\/div>\n<\/li>\n<\/ul>\n<h4>Conclusion<\/h4>\n<p>tmux simplifies terminal management and remote server administration. For professional assistance with Linux server management, monitoring, security, and maintenance, contact Skynats to discuss your requirements.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction If you work in the terminal a lot, especially SSH, you&#8217;ve probably wanted to run several terminal sessions at once without opening a dozen windows. That&#8217;s exactly what tmux helps with. Tmux is a terminal multiplexer, a tool that helps you split one terminal into multiple panes and windows, and keep sessions running even [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-17747","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/17747","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=17747"}],"version-history":[{"count":1,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/17747\/revisions"}],"predecessor-version":[{"id":17748,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/17747\/revisions\/17748"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=17747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=17747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=17747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}