||
tmux basically offers two big features: Window management in your terminal and session management.
1. tmux’s authors describe it as a terminal multiplexer. Behind this fancy term hides a simple concept: Within one terminal window you can open multiple windows and split-views (called “panes” in tmux lingo). Each pane will contain its own, independently running terminal instance. This allows you to have multiple terminal commands and applications running visually next to each other without the need to open multiple terminal emulator windows.
2. On top of that tmux keeps these windows and panes in a session. You can exit a session at any point. This is called “detaching”. tmux will keep this session alive until you kill the tmux server (e.g. when you reboot)2. This is incredibly useful because at any later point in time you can pick that session up exactly from where you left it by simply “attaching” to that session.
For instance, if you’ve ever worked with remote servers or a Raspberry Pi over ssh you can guess where this will be useful: When you lose your ssh connection the tmux session will simply be detached but will keep running on the server in the background including all the processes that run within your session. To continue your session simply ssh to the server again and attach to the running session.
Hands-on guids:
Fortunately installing tmux is pretty straightforward on most distributions a simple sudo apt-get install tmux
(Ubuntu and derivatives) or brew install tmux
(Mac) should be sufficient.
For your first session simply start tmux with a new session:
tmux
This will create a new tmux session
From: https://www.hamvocke.com/blog/a-quick-and-easy-guide-to-tmux/
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-23 06:11
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社