The tmux tool is one of a number of Linux terminal window splitters that allow you to run commands in adjacent (up\/down, right\/left or both) panes so that you can easily use the output in one pane to help with work you\u2019re doing in another. You can even disconnect a multi-pane tmux session and reattach to it when you need it again.\nWhat's more, processes running within tmux will continue running even when you detach, making tmux an excellent tool to use when you\u2019re not sure your connection to a remote server is solid and don't want to be dropped in the middle of an important task.\nThe \u201cmux\u201d in the name tmux stands for multiplexer. This term generally refers to sharing digital connection or an information stream. So, \u201ctmux\u201d stands for \u201cterminal multiplexer\u201d. The tool is similar to terminator and konsole. However, tmux\u00a0is also available on some OSes other than Linux including MacOS.\nThe primary drawback of tmux is that you have to learn some mildly awkward command sequences to use it. However, if you can adjust to just about everything you need to do starting with Ctrl-b (hold the Ctrl key and press b), you\u2019re off to a good start.\nStarting tmux is easy. Just type \u201ctmux\u201d in a terminal window. If you plan to detach and return to a session later, it's a good idea to give the session a meaningful name.\nTo start a session type:\n$ tmux\nTo start a named session type:\n$ tmux new -s perf\nOnce tmux is started, a bar along the bottom of the tmux session will display the session name (if used), server name, and current (updating) time and date.\n[perf] 0:bash* "dragonfly" 15:45 25-May-20\n\nOpening new panes is quite easy with commands likes these below. You just have to remember that % means "to the right" and " means "below":\nCtrl-b % open a pane to the right of the current pane\nCtrl-b \u201c open a pane below the current pane\n\nMoving from pane to pane then requires the use of arrow keys. If you want to move to a pane to the right, use Ctrl-b followed by pressing the right arrow key and, if you want to move down a pane, use Ctrl-b following by the down arrow key. In other words, use whichever arrow key points in the direction you want to move \u2013 right, left, up or down.\nTo close a pane, first ensure that you're positioned in it. Then type "exit" or Ctrl-d. Note that there is no need for Ctrl-b in this step. Once you type "exit" or Ctrl-d in the last remaining pane, tmux will close.\nYou can also exit tmux\u00a0by\u00a0pressing : to go to the bottom bar of the tmux window. Then type kill-session. Note that the session will be gone and will not be reattachable.\nIf you want to detach a session instead of simply closing it, use Ctrl-b d\u00a0(d for "detach"). You can detach with all of the panes still open.\nTo list detached sessions, use the command tmux ls\u00a0on the command line or within a tmux session. Sessions without given names will be called 0, 1, 2 etc., in the order in which they were created. Only detached sessions will show up in the output of the tmux ls command.\nYou can rename a session with a command like this:\n$ tmux rename-session -t 0 acct-mgt\n$ tmux ls\n1: 1 windows (created Sat May 23 16:10:26 2020)\nacct-mgt: 1 windows (created Mon May 25 16:09:52 2020) (attached)\n\nYou can reattach to a session using a command like one of these that includes the session name you assigned or was automatically provided:\n$ tmux attach -t acct-mgt\nor\n$ tmux attach -t 0.\nNote that, if you reattach a session and then exit instead of detaching, it will no longer be available for reattaching.\nRecipe for a 3-pane tmux session\nWant a recipe for setting up a tmux window like this that you can reuse any time you want?\n+-----------------------------------------+\n| || || || |\n+--------------------+--------------------+\n| | || | || | || | |\n+-----------------------------------------+\n\nHere goes. First start your session and give it a name. In this example, we're calling the session\u00a0 "tmux3" because it will have three panes.\n$ tmux new -s tmux3\n\nAfter it opens, type these character sequences:\nCtrl-b \u201c\t\t> ~\/.bashrc\n\nGot that? You will have to detach every time you use the tmux session by typing Ctrl-b d. Otherwise, the session will no longer be saved. And don\u2019t forget that the session will always pick up where you left off, displaying the output of any commands that are still running.\nFor example, if you left top running when you last used the session, it will still be running after you have detached and adding output to the pane in which it's active. If you kill that\u00a0top\u00a0process outside of tmux\u00a0(which you can), it will no longer be running when you reattach your session. After all, tmux is not a separate system, just a way of splitting your terminal connection. Detaching doesn't disrupt the running processes, whick is one of the key benefits of using tmux in the first place.\nThere are lots of other options available for use with tmux. We've only touched on the basics in this post. Refer to the tmux man page for more information, but be aware that C-b is sometimes used to represent\u00a0Ctrl-b.