Skip to content

Commit 43bdd4a

Browse files
authored
add tmux commands
compare tmux and screen
1 parent e489460 commit 43bdd4a

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,19 @@ Taylor Swift videos:
412412
# 强制结束一些,你结束不了的session
413413
screen -X -S [session # you want to kill] quit
414414

415+
## tmux vs screen 常用操作对照表
416+
417+
| 操作 | screen 命令 | tmux 命令 |
418+
|--------------|----------------------------------|------------------------------------|
419+
| 安装工具 | `yum install -y screen` | `yum install -y tmux` |
420+
| 创建会话 | `screen -S name` | `tmux new -s name` |
421+
| 分离会话 | `Ctrl+a d` | `Ctrl+b d` |
422+
| 查看会话 | `screen -ls` | `tmux ls` |
423+
| 恢复会话 | `screen -r name` | `tmux attach -t name` |
424+
| 强制恢复会话 | `screen -d -r` | `tmux attach -d -t name` |
425+
| 结束会话 | `exit``Ctrl+d` | `exit``Ctrl+d` |
426+
| 强制关闭会话 | `screen -X -S name quit` | `tmux kill-session -t name` |
427+
415428

416429

417430
# shell命令

0 commit comments

Comments
 (0)