Tmux Terminal Multiplexer

Tmux is a terminal multiplexer, it enables a number of terminals (or windows) to be accessed and controlled from a single terminal. Tmux is intended to be a simple, modern, BSD-licensed alternative to programs such as GNU screen. Tmux may be detached from a screen and continue running in the background, then later reattached.
When Tmux is started it creates a new session with a single window and displays it on screen. A status line at the bottom of the screen shows information on the current session and is used to enter interactive commands.
A session is a single collection of pseudo terminals under the management of Tmux. Each session has one or more windows linked to it. A window occupies the entire screen and may be split into rectangular panes, each of which is a separate pseudo terminal. Any number of TMUX instances may connect to the same session, and any number of windows may be present in the same session. Once all sessions are killed, Tmux exits. Also checkout Tmux manual.
tmux

You can use keybind + key combination to perform actions for Tmux, follow these keys:
KeyBind + Combination Key Action Description
Ctrl+b % Split the current window vertically into two panes
Ctrl+b :split-window Horizontally split window or current pane
Ctrl+b o Switch to the next pane
Ctrl+b c Open new window
Ctrl+b l Move to previous window
Ctrl+b n Move to next window
Ctrl+b p Move to previous window
Ctrl+b d Detach current client
Ctrl+b x Kill the current pane
Ctrl+b & Kill the current window
Ctrl+b , Rename the current window
Ctrl+b q Display pane numbers
Ctrl+b ? List all keybindings
Ctrl+b { Move the current pane to previous
Ctrl+b } Move the current pane to next
Ctrl+b :break-pane Detach pane into its own window
Ctrl+b w List all windows
Ctrl+b 0-9 To select window


Pane Resizing:
tmux resize
Tmux also allows you to resize panes as you like, follow these commands:
KeyBind + Combination Key Action Description
Ctrl+b :resize-pane Resize current pane down by default
Ctrl+b :resize-pane -U Upward Resize current pane
Ctrl+b :resize-pane -R Resize current pane to right
Ctrl+b :resize-pane -L Resize current pane to left
Ctrl+b :resize-pane 40 Resize current pane down by 40 cells
Ctrl+b :resize-pane -L 40 Resize current pane left by 40 cells
Ctrl+b :resize-pane -R 40 Resize current pane right by 40 cells
Ctrl+b :resize-pane -U 40 Resize current pane upward by 40 cells
Ctrl+b :resize-pane -t -L 40 Resize pane with id of 2 left by 40 cells
Ctrl+b :resize-pane -t 2 40 Resize pane with id of 2 down by 40 cells

Install Tmux Terminal Multiplexer in Ubuntu/Linux Mint/other Ubuntu derivatives with following command:
After installation open it by typing tmux in Terminal.


Screen Terminal Multiplexer

Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells. Each virtual terminal provides the functions of the DEC VT100 terminal and, in addition, several control functions from the ANSI X3.64 (ISO 6429) and ISO 2022 standards (e.g., insert/delete line and support for multiple character sets). There is a scrollback history buffer for each virtual terminal and a copy-and-paste mechanism that allows the user to move text regions between windows. When screen is called, it creates a single window with a shell in it (or the specified command) and then gets out of your way so that you can use the program as you normally would. Then, at any time, you can create new (full-screen) windows with other programs in them (including more shells), kill the current window, view a list of the active windows, turn output logging on and off, copy text between windows, view the scrollback history, switch between windows, etc. All windows run their programs completely independent of each other. Programs continue to run when their window is currently not visible and even when the whole screen session is detached from the users terminal.
GNU Screen can be thought of as a text version of graphical window managers, or as a way of putting virtual terminals into any login session. It is a wrapper that allows multiple text programs to run at the same time, and provides features that allow the user to use the programs within a single interface productively. This enables the following features: persistence, multiple windows, and session sharing. Checkout screen manual.
screen

You can control screen multiplexer with following keys:
KeyBind + Combination Key Action Description
Ctrl+a | (Vertical Bar) Split pane vertically
Ctrl+a Shift+s Split pane horizontally
Ctrl+a Shift+q Detach current pane
Ctrl+a Tab To switch between panes
Ctrl+a c To open pane session or New window
Ctrl+a space Move to next terminal
Ctrl+a backspace Move to previous terminal
Ctrl+a " To choose between terminal windows
Ctrl+a 0-9 To navigate between terminal windows
Ctrl+a :remove Remove current pane
Ctrl+a Shift+x Remove current pane
Ctrl+a :only Remove all panes except one
Ctrl+a \ To close all panes and exit screen
Ctrl+a :resize 40 Resize pane by 40 cells
Ctrl+a p Move to next process pane
Ctrl+a n Move to previous process pane

Install Screen Termial Multiplexer in Ubuntu/Linux Mint/other Ubuntu derivatives with following command:
After installation open it by typing screen in Terminal.
That's it
Share To: