tmux is a terminal multiplexer: it enables a number of terminals (or windows), each running a separate program, to be created, accessed, and controlled from a single screen.
tmux may be detached from a screen and continue running in the background, then later reattached.
It allows you to easily manage separate terminal sessions inside a single terminal window.
tmux can connect to a server, and multiple clients can be connected to the same session, simultaneously exchanging their input and display.
You can use these commands and shortcuts to work with tmux in Linux. From the command line:
|Start a new session
|tmux new -s
|Start a new session with the name chosen
|List all sessions
|Ctrl b, "
|Split pane horizontally
|Ctrl b, %
|Split pane vertically
|Ctrl b, o
I've used tmux for years, and it has become an essential part of my work flow. I couldn't imagine editing code without it. If you want to practice Linux commands, you can use these exercises
tmux is a terminal multiplexer: it enables a number of terminals to be created, accessed, and controlled from a single screen.
• Splitting a terminal window into horizontal or vertical panes.
• The ability for windows to be re-ordered by the user, and to be assigned names.
• Executing shell commands in any pane, and running custom commands in response to window changes.
• Detaching and reattaching a session (allowing the user to leave terminals behind, and then return to them).
• A powerful configuration language.
tmux is very useful for people who commonly work on remote machines via ssh.
Why did I pick tmux over screen and a terminal multiplexer? Three reasons.
- First, tmux is written is responsive and light.
- Second, tmux is much more expressive than screen. I can split my terminal into six panes and change the size of each pane with the same ease as resizing a terminal in GNU Screen.
- Third, tmux has integrated support for a status bar. This means I can read from one pane and keep an eye on other panes at the same time.