Skip to content

tmux hotkey cheatsheet on Linux

Level 1

tmux # 新建一个无名称的会话
tmux new -s demo # 新建一个名称为demo的会话

tmux detach # 断开当前会话
<Ctrl+b> + d # 断开当前会话

tmux ls # 查看所有会话

tmux a # 默认进入第一个会话
tmux a -t demo # 进入到名称为demo的会话

tmux kill-session -t demo # 关闭demo会话
tmux kill-server # 关闭服务器,所有的会话都将关闭

<Ctrl+b> + % # 划分左右两个面板 (pane)
<Ctrl+b> + " # 划分上下两个面板

<Ctrl+b> + o # 选择下一面板
<Ctrl+b> + <Arrow Key> # 光标切换到其他面板

<Ctrl+b> + 空格 # 切换面板布局
<Ctrl+b> + x # 关闭当前面板

<Ctrl+b> + c # 新建窗口 (window)
<Ctrl+b> + p # 切换到上一窗口
<Ctrl+b> + n # 切换到下一窗口

<Ctrl+b> + t # 显示时钟

Level 2-10

  • https://gist.github.com/MohamedAlaa/2961058
  • https://gist.github.com/ryerh/14b7c24dfd623ef8edc7

Disclaimer
  1. License under CC BY-NC 4.0
  2. Copyright issue feedback me#imzye.me, replace # with @
  3. Not all the commands and scripts are tested in production environment, use at your own risk
  4. No privacy information is collected here
Try iOS App